Commit Graph

37892 Commits

Author SHA1 Message Date
Campbell Barton
75a5e239d7 correct enums which were in fact variables defined in headers. 2013-03-22 05:46:39 +00:00
Campbell Barton
a79e10157d code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
2013-03-22 05:34:10 +00:00
Campbell Barton
dd0e2da784 code cleanup: use booleans and const's for operator vars. 2013-03-22 04:40:45 +00:00
Campbell Barton
e537fae726 fix error with merge operator not handing error cases properly (errors wouldn't cancel the operator as they should).
was mixing up OPERATOR_CANCELLED with 0.
2013-03-22 04:39:43 +00:00
Joshua Leung
b5b83ce601 Tweak to previous commit - make range check less strict so that indicators don't
flicker off so easily when target moves off screen
2013-03-22 03:25:31 +00:00
Joshua Leung
48b50ec154 Graph Editor: Draw indicators on the active Driver F-Curve which show the
relationship between the result of driver evaluation (NKEY region stuff) and the
end result applied to the driven properties.

Example:
http://www.pasteall.org/pic/47687
2013-03-22 02:28:55 +00:00
Dalai Felinto
5ef9a20671 BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material
Bug introduced on rev.36723
2013-03-21 23:20:46 +00:00
Campbell Barton
f254ba77fd code cleanup: conversion from blender to BGE was unnecessarily confusing in checking weather to use vertex colors,
move check to function.
2013-03-21 23:11:52 +00:00
Dalai Felinto
6d8b3d2d94 BGE bugfix: [#34550] getVertexArrayLength changed in 2.66
This bug was producing way more geometry than we need. Potentially
memory saver (or performance even) bugfix.

Bottomline is:
We need to initialize the UVs otherwise vertex comparison fails ...
Ideally MoTo should take care of initializing MT_Point2
(note in Windows that seems to be fine, but it's safer to not rely on that)
2013-03-21 21:10:14 +00:00
Campbell Barton
b57fc113aa python api: add functionality to remove uv-texture layers. 2013-03-21 20:54:48 +00:00
Lukas Toenne
8ff3fa8ab2 Fix for Render Layers node, reported by Jason van Gumster (Fweeb) on IRC. The render layer operations need their RenderData pointer set. This was done for all connected output operations, but not for the preview operation which uses the image color layer. In case the image output is unconnected this leads to NULL pointer access. 2013-03-21 20:31:09 +00:00
Campbell Barton
fa1cd9ce9b python api: add functionality to remove vertex color layers.
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
	  since being in vertex-paint mode without a vertex color layer is supported.

also minor change to drawing camera limits while picking from previous commit.
2013-03-21 20:15:39 +00:00
Campbell Barton
21c55d5304 mist line can now be used for camera selection. 2013-03-21 18:57:05 +00:00
Lukas Toenne
9713d5e740 Fix for a node compatibility code bug (reported by kopias in IRC). Compatibility data (links with NULL fromnode/tonode pointers) was created for all node trees in library data, including local scene/material/... trees, but on loading was only actually removed for node groups. Now cleans up all trees in the library to be sure, and only generate new compat data for actual group trees. 2013-03-21 18:33:38 +00:00
Campbell Barton
245a9db713 patch [#34687] Patch for AutoMerge button in 3d editor
from Dan McGrath (dmcgrath)
2013-03-21 17:26:15 +00:00
Campbell Barton
fdc3b7dfef fix for own recent commit - added function into wrong side of ifdef 2013-03-21 16:06:46 +00:00
Campbell Barton
a8b6b5ec4c use clip alpha setting for empty-image drawing. 2013-03-21 15:43:05 +00:00
Sergey Sharybin
f3db38de56 Render border + crop will be handled correct in compositor now
This commit simply implements mapping from centered cropped canvas
to a full-frame coordinates, so operations like alpha-overing render
result on top of image will be properly aligned.
2013-03-21 15:26:41 +00:00
Campbell Barton
0b40266afc revert edit from r55461, causing build error on some systems. 2013-03-21 14:46:37 +00:00
Campbell Barton
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
Campbell Barton
dad7afa1af code cleanup: remove double call to BKE_node_instance_key(), rename ruler (lots of tools are 3d :)), and redundant assignment. 2013-03-21 14:16:55 +00:00
Campbell Barton
401fdf5065 py api: add Object.update_from_editmode(),
Useful for python exporters to avoid toggling editmode on export, moved into own function ED_object_editmode_load(obedit).
2013-03-21 14:12:04 +00:00
Lukas Toenne
fa0e2603f5 Add a little bit of space between socket layouts on nodes. 2013-03-21 13:21:18 +00:00
Lukas Toenne
8066c09df2 Fix for extra string width padding in ui_text_icon_width, causing labels in right-aligned layouts show an annoying gap. If the layout is right-aligned, make the text button align right as well, so text is drawn at the right side of the alloted rect. 2013-03-21 12:58:31 +00:00
Ton Roosendaal
0d7f7c253b Bug fix #34713
Using MultiSample, the code that inspects Z buffer values fail, like for grease pencil
drawing on "Surface".

It appears to me that all this depth draw/read code is ignoring gpu offscreen entirely.
This should be confirmed by Campbell though :)

I'm also quite unsure why this code exists, related to other tools that use
depth too (particles, sculpt). Good to mark down for our viewport recode.
2013-03-21 11:48:13 +00:00
Joshua Leung
67e54eb819 Bugfix: Transform autokey warning indicator text was getting clipped prematurely
After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.
2013-03-21 11:14:53 +00:00
Sergey Sharybin
1769319ce2 Tweaks to movie clip prefetching after discussion with Sebastian
Don't use sequencer's Frames Prefetch option and rather fill the
whole cache with frames.

Since movie clip is not "classical" prefetcher (it doesn't do
anything while playing back) and main purpose is to speed up
reading for further tracking and so, such a change seems logical.
2013-03-21 07:47:38 +00:00
Joshua Leung
3725089b6b Driver error warnings are now only printed to the console when Blender is run
using the -d flag

This prevents a stream of error messages flooding the console when working with
particular rigs which may have a few broken controls. In general, riggers now
have a better alternative by using the filtering tools in the Graph Editor.
2013-03-21 06:11:16 +00:00
Joshua Leung
3b885751b6 Bugfix [#34688] Auto-Keying doesn't include custom properties when pasting poses
Previously, Paste Poses only used the LocRotScale Keying Set for autokeyframing
purposes. This was fine for most purposes, but with many rigs these days also
using custom properties for important posing functions, it's important that we
include those here too.
2013-03-21 04:22:29 +00:00
Campbell Barton
3966722057 code cleanup: misc warnings/style 2013-03-21 02:58:21 +00:00
Campbell Barton
2d236a57b7 fix for incorrect use of 'bool', also fix 2 older bugs in fly mode.
- panning didnt keyframe translation animation.
- when checking to key translation: speed `float` was converted to an `int` then treated as a bool, now check (speed != 0).
2013-03-21 02:56:16 +00:00
Campbell Barton
8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
Bastien Montagne
885441e758 I18n users request: add the ability to use a translated name for newly added/created objects or other datablocks.
This simply adds a third "translation type" (in addition to iface and tip), "new data", with relevant user settings flag and helper funcs/macros (and py api).

Currently implemented name translation when adding new objects, as well as modifiers and constraints, will add the others (cd layers, scenes, perhaps nodes [though I think they do not need this], etc.) later.
2013-03-20 18:42:09 +00:00
Sergey Sharybin
e9b0b402cc Changes to compositor output node
Make it so compositor output node wouldn't be calculated
when Render Result image is not visible on the screen.
This makes compositor tree editing more friendly and
faster.

Also, if there's no viewer image visible on the screen
viewer nodes wouldn't be handled.

Final rendering keeps unchanged for now.

This solves issues when for performance artists are
disconnecting compo output node before tweaking values
in compositor and forgets to attach compo output
node before sending file to the farm.
2013-03-20 18:01:47 +00:00
Sergey Sharybin
1b9e17fb9a When using border rendering, use the same border for compositor
This makes compositing as fast as it's possible in this case.

The only thing is border render+crop will still give funcy
results. This is the next thing to be solved in compositor.
2013-03-20 18:01:41 +00:00
Daniel Genrich
b5ac9639dc Bugfix [#34710] Crash on duplicating object with cloth modifier.
Caused by last commit by me.
2013-03-20 17:45:35 +00:00
Sergey Sharybin
808ac6debf Prefetching for movie clips
This commit basically implements frames prefetching for
movie clip datablock.

Number of frames to be prefetched is controlled in User
Preferences, System tab, Prefetch Frames option.

Currently prefetching is destructive-less for movie cache,
meaning mo frames will be removed from the cache when while
prefetching. This is because it's half of simplier to
implement, but it also makes sense from tracking point of
view -- we could want to playback in both directions and
removing frames from behind time cursor is not always a
good idea.

Anyway, smarter prefetching strategy could be developed
later.

Some implementation notes:

- Added MEM_CacheLimiter_get_memory_in_use function to get
  memory usage of specified memory limiter.

- Fixed prototype of MEM_CacheLimiter_get_maximum which
  was simply wrong (used wrong data type for output).

- Added some utility functions to movie clip and movie
  cache for direct cache interaction and obtaining cache
  statistics.

- Prefetching is implemented using general jobs system.
  which is invoking from clip draw function.

- Prefetcing will stop as soon other job or playback starts.
  This is done from performance point of view. Jobs will
  likely require lots of CPU power and better to provide
  whole CPU to it.

  Playback is a bit more complicated case. For jpeg sequence
  playback prefetching while paying back is nice. But trying
  to prefetch heavy exr images and doing color space
  conversion slows down both playback and prefetching.

TODO:

- Think of better policy of dealing with already cached frames
  (like when cached frames from other clips prevents frames
  from current clip to be prefetched)

- Currently a bit funky redraw notification happens from
  prefetch job. Perhaps own ND_ is better to have here.

- Hiding clip while prefetch is active in theory shall stop
  prefetching job.

- Having multiple clips opened on file load will prefetch
  frames for only one of them.
2013-03-20 17:03:20 +00:00
Ton Roosendaal
d6ad96e2a9 Small fix: make node backdrop draw with nearest-pixel filter, so it zooms in
showing pixels. Issue was it also blurred image at zoom level 1... maybe subpixel
issue. Anyway - for inspecting exact composite results, zooming in showing pixels
is nicer anyway.
2013-03-20 16:30:48 +00:00
Campbell Barton
f8611bac8f - add knife project to toolbar.
- when running knife project, disable vertex selection since it may select areas between the newly cut regions.
  add EDBM_selectmode_disable() function since loopcut does this too.
- (optimization) avoid looping over all geometry when flushing and no selection exists.
2013-03-20 16:03:34 +00:00
Lukas Toenne
447de0a6c4 Fix #34694. This was actually a bug in the compositor's Bokeh Blur operation. It was writing outside of allocated memory in case of (0, 0) size buffers, with the usual unpredictable results. 2013-03-20 15:54:16 +00:00
Campbell Barton
d4af049fab add option to convert grease pencil into poly line directly.
Without this, bezier curves at 12 resolution are very high detail for many tasks when converted from freehand strokes.
so add the option to convert 1:1 grease pencil points to curve polygons.

also add use_handles option to curve conversion which is used when converting beziers to poly lines.
2013-03-20 15:01:15 +00:00
Lukas Toenne
f88e48fa55 When making a node group always add one input and one output node, regardless of whether there are any exposed sockets. The standard common case is that some sockets will eventually have to be exposed anyway, and it's easier to just delete the unused node instead of having to look it up in the menu. 2013-03-20 13:58:03 +00:00
Campbell Barton
643365818f add back -Wredundant-decls, just not for older gcc's 2013-03-20 13:30:20 +00:00
Lukas Toenne
1c3b3321e7 Fix for #34708 and #34709, cycles group nodes were not working well with 0 or 2+ group input/output nodes.
The issue here was that the proxy nodes created for connecting extern group node sockets to the internal nodes were generated by the input/output nodes themselves.

0 input/output nodes: there would be no proxy that external group node sockets can map to
2+ input/output nodes: additional nodes would overwrite entries from previous nodes, so that only one of the input/output nodes would be used.

Solution is to always generate exactly 1 proxy node for every group socket in advance, regardless of whether it is used internally. Internal node sockets can then all map to this proxy node.

In the case out output nodes there should only ever be one active node, otherwise the connection to the proxy would be ambiguous. For this purpose the NODE_DO_OUTPUT flag has been exposed to RNA, so that cycles can check it and only use the active output.
2013-03-20 13:17:35 +00:00
Lukas Toenne
a385d5f682 Fix for compositor bug introduced in pynodes branch by removing the default MuteNode for unspecified nodes in the COM_Converter. Not sure why i removed this in the first place, but it means that reroute nodes are not properly replaced in composites. It worked for preview and viewer composite because the reroute nodes are replaced there already by the node tree localization ... this needs to be cleaned up. 2013-03-20 10:06:28 +00:00
Lukas Toenne
3f1034c2b1 Fix for bug reported on bf-committers: RNA function nodetree.links.new does not remove existing links when connecting to a linked input. The check for socket connection limits was 1 off, needs to add 1 to the link counter to anticipate the newly added link. 2013-03-20 09:53:29 +00:00
Campbell Barton
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
Campbell Barton
cb11af8b06 fix for knife tool crash when knife_make_chain_cut() couldn't create a new face. 2013-03-19 21:37:22 +00:00
Lukas Toenne
42d65dd7ff Fix #34697, Undoing a node group crashes Blender.
The problem here was that the extra forward compatibility data for node groups (links to the node interface sockets) was written for files as well as undo memfiles. But only in the case of true .blend files is this data subsequently removed again after loading, which in the case of undo leaves invalid links hanging around in the node tree. Forward compat data is now skipped for undo.
2013-03-19 20:37:25 +00:00
Bastien Montagne
d39c6fdf2d Various cleanup around default i18n context.
Issue is that the real default context is NULL, however, in python and RNA, this value can't be used easily. So we use a specific string instead ("*"), defined as BLF_I18NCONTEXT_DEFAULT_BPYRNA.

From now on, all bpy/rna code should only use the BLF_I18NCONTEXT_DEFAULT_BPYRNA value, while all "usual" C code should use the BLF_I18NCONTEXT_DEFAULT value (BLF_pgettext is still able to "understand" both, anyway).

Also added BLF_is_default_context helper func, so that we can keep that check in a single place!

Finally, we should no need anymore to understand the void string "" as default context too - two values for a same thing are more than enough!
2013-03-19 19:37:22 +00:00
Campbell Barton
5c48eb3bb9 change to variable size bokeh blue, dont blur larger areas then the current pixel defines.
caused nasty looking errors with DOF.
2013-03-19 18:32:56 +00:00
Lukas Toenne
aa40fcb0a7 Removed the is_local_tree property from compo/shader/texture node trees. This was using an ID property, which causes trouble with 2.62 builds (possibly later) due to an old bug that causes ID properties in local node trees not loaded correctly. The bug has been fixed since then, but creating id properties will break with these builds. The property was not really necessary, so removing it will make it work as long as users don't add id properties themselves. 2013-03-19 18:15:33 +00:00
Lukas Toenne
57cc2fd4a0 Fix for an old issue: Node names need to be unique to ensure proper preview image mapping (node instance keys are generated from node names). This caused problems with some of the old test files (e.g. compo_map_zcombine_cubes.blend).
When the uniqueness requirement was introduced in r24478 (2.50.8) for unambiguous RNA paths for animation a do_versions check was also added, but this was incorrectly only applied to main->nodetree (i.e. node groups) and not local trees in scene, material, etc.
2013-03-19 14:53:46 +00:00
Thomas Dinges
7cba869a94 Fix for [#34693] Linked Duplicate of object with Ocean modifier fails to copy geometry_mode parameter 2013-03-19 14:38:03 +00:00
Antony Riakiotakis
526d79d688 Fix: jittered brushes are not jittered, reported by kursad karatas.
Issue is sharing using global random generator which is shared with
particle system which resets the seed due to some scene/option
combination. Since it may be desirable to get predictable results with
particles, made sure brushes allocate their own random number generator
on startup and use that for jittering.
2013-03-19 14:25:12 +00:00
Thomas Dinges
8fe0c0eb45 Cycles / Mix Shader:
* Made "Fac" Socket a "PROP_FACTOR", like the other Fac sockets in the compositor.
2013-03-19 13:46:46 +00:00
Lukas Toenne
bbac76ee26 Nicer handling of undefined node, tree and socket types.
When nodes are loaded from a .blend file they can potentially have undefined types. This can happen if a type has been deprecated and removed, or if node types were defined in a python script that has not been loaded correctly. Previously all such nodes would automatically be removed from a node tree, assuming that their types were deprecated and no longer in use (more commonly caused by loading new nodes in an older Blender version). Due to the possibility of dynamic registration it is no longer feasible to simply delete such nodes.

Display and handling of node trees was simply disabled before this patch, so that a node tree where any node or socket type was undefined would not be displayed at all. To give more information and avoid problems caused by necessary checks for the typeinfo pointer, there is now a 'Undefined' fallback type for trees, nodes and sockets. These types are used as placeholders in case the real type is not registered and can provide useful visual feedback on undefined nodes.
2013-03-19 13:40:16 +00:00
Sergey Sharybin
c9d981c86d Fix regression in viewport background image transparency
Was caused by recent changes to automatically switch between
glaDrawPixelsTex and glaDrawPixelsSafe depending on resolution.

glaDrawPixelsSafe could not be sued for viewport because it'll
miss alpha transparency.
2013-03-19 13:38:43 +00:00
Antony Riakiotakis
8c90d23462 Fix: Clamp alpha to 1.0 or adding alpha in paint creates "isolines" due
to integer overflow. One of the beautiful bugs that is sad to see fixed.

Also remove unused timer variable
2013-03-19 13:32:57 +00:00
Thomas Dinges
d215f453df UI / Node Editor:
* Align Render Layer menu and Render button in "Render Layers" node. 
This looks better and the settings belong together as well.
2013-03-19 13:31:54 +00:00
Lukas Toenne
a7dd76c43f Fix for GLSL shader nodes when using Cycles nodes with shader sockets. These did not get a stack index assigned, but for GLSL they are simply replaced by colors. 2013-03-19 13:00:32 +00:00
Campbell Barton
d466e1d3b4 add BLI_rcti,f_recenter()
fix for uninitialized variable use in radial_control_get_properties() and bad cast in bpy api's foreach_parse_args()
2013-03-19 10:54:52 +00:00
Lukas Toenne
0f3515d4e2 Fixes for context updates of the node editor:
* If the node tree can be updated from context (tree has get_from_context callback defined), reset the pointers first to clear the editor path if no tree can be found.
* Stupid mistake: snode->from != snode->from is always false.
* Shader nodes context update: set the 'from' pointer to the active object, even if it doesn't have a material or node tree.
2013-03-19 10:42:33 +00:00
Lukas Toenne
422ed07339 Fix for shader node sockets not displaying the name when unconnected. Default button draw implementation for node sockets should be to display just the name label. 2013-03-19 10:03:52 +00:00
Sergey Sharybin
4e93ac546f Use checker backdrop for footage with alpha channel in clip editor
Also use glaDrawPixelsAuto as a fallback method. Hopefully it'll
make using 2D textures for frames higher resolution than
GL_MAX_TEXTURE_SIZE.
2013-03-19 08:53:01 +00:00
Sergey Sharybin
dc3ce6db6a Added alpha output to movie clip compositor node
Pretty much straightforward change, made in the same way as
texture input node.

Shall not be any regressions or crashes when mixing usage
of 2.66 and current trunk.
2013-03-19 07:46:32 +00:00
Mitchell Stokes
e6020cd320 BGE: Adding a getProfileInfo() function to bge.logic. This function returns a Python dictionary with the same information as the on screen profiler. 2013-03-19 04:51:37 +00:00
Dalai Felinto
4a5a5f2968 bge bugfix: [#34677] Setting Boolean property on KX_GameObject creates Int type
we need to check for booleans before testing for longs.
2013-03-18 22:52:43 +00:00
Pablo Vazquez
779b26058b Grease Pencil UI
The recent addition of the up/down arrows wasn't aligned.

Before/After: http://www.pasteall.org/pic/show.php?id=47512

Patch by Francesco Siddi.
2013-03-18 22:28:27 +00:00
Campbell Barton
03762409cd rewind 55389 and make this gcc4.6+ only 2013-03-18 21:36:12 +00:00
Daniel Genrich
7432924216 Smoke Bugfix /enhancement: Load pre 2.65 pointcaches.
Warning: Just make sure that you DON'T free the cache at any point. This patch can only display existing pointcaches from e.g. 2.64
2013-03-18 21:33:48 +00:00
Dalai Felinto
650a44595b fix for build error: "#pragma GCC diagnostic not allowed inside functions"
It works in a newest gcc (e.g. 4.6.3) but fails here:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2336.11.00)
2013-03-18 21:16:04 +00:00
Sergej Reich
95bcb9d2fb Add capluse bounds drawing
Patch [#34566] by Alain Ducharme (phymec).
2013-03-18 20:32:30 +00:00
Sergej Reich
4285c45424 game engine: Increase hard limit for fps property
Patch by Alain Ducharme (phymec).
2013-03-18 20:32:28 +00:00
Lukas Toenne
d5c1a80294 Added back the custom limits for value properties in standard node socket types, to override the standard range based purely on subtype. 2013-03-18 20:27:39 +00:00
Thomas Dinges
3147d95bdf Node Interface:
* Small tweak to the "Interface" panel for group nodes, move separator into the branch to save some UI space.
2013-03-18 19:59:11 +00:00
Lukas Toenne
c285f1c02a Use extern "C" when including BKE_node.h in C++ compositor code, to avoid linker errors on windows (undefined NODE_INSTANCE_KEY_BASE). 2013-03-18 19:19:28 +00:00
Lukas Toenne
b2374f8de3 Node poll_instance callback is optional, check if it exists before executing. 2013-03-18 19:19:26 +00:00
Bastien Montagne
66c7b54a88 Usual minor UI messages fixes. 2013-03-18 18:43:22 +00:00
Campbell Barton
b38870ce25 quiet warning about writing to deprecated member with gcc. 2013-03-18 18:37:59 +00:00
Ton Roosendaal
25fa2eedc4 UI fix: drawing disabled buttons now draw OK in all cases.
The old 2.5 code was just drawing a blended rect over buttons, which looks bad
in cases the backdrop is undefined. 

Now widget drawing code just draws everything half transparent. Much nicer!
Time for textured backdrops? ;)
2013-03-18 18:29:22 +00:00
Thomas Dinges
471238ebfc Node Editor / Group UI:
* Add, Move and Remove Socket operators missed a notifier for UI redraw.

Note: ND_DISPLAY seems to be for the Text editor only, according to WM_types.h, but seems to be used in quite a few places. 
Time to cleanup notifiers again.
2013-03-18 18:27:28 +00:00
Campbell Barton
01e9dae3dc code cleanup 2013-03-18 18:25:05 +00:00
Lukas Toenne
57f69f2f18 Added missing stub for uiTemplateNodeSocket. 2013-03-18 17:24:47 +00:00
Lukas Toenne
061cdee6dc Fix for stupid MSVC compiler, float array cast not supported. 2013-03-18 17:24:16 +00:00
Bastien Montagne
e7010e1b7d Fix blenderplayer (looks like gcc4.7 dislikes unamed parameters ;) ). 2013-03-18 17:08:29 +00:00
Lukas Toenne
4638e5f99a Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.

Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].

=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].

The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-03-18 16:34:57 +00:00
Ton Roosendaal
ee692508d9 Bug fix, irc:
Curves widget error: after deleting a point, and click to add a new point, on dragging
it the point flipped up 20 pixels. Was caused by changed layout and region view matrix.

Solved by storing actual mousecoords instead of mapped ones.
2013-03-18 13:57:47 +00:00
Ton Roosendaal
0ee5a2b956 Just added a comment:
To make circle select allow pass-through for view events, several issues have to be
tackled. 
 1) other modal ops run on top (border select), 
 2) middlemouse is used now 
 3) and what for tablet/trackpad or people without middlemouse?

The MMB deselection for border/circle is not optimal now... needs rethinking this.

Better would be to check on non-persistant-modality for circle, to start with gesture style
event like lasso or border can do now.
2013-03-18 12:16:19 +00:00
Campbell Barton
655ed9cc7f style cleanup 2013-03-18 11:44:56 +00:00
Sergey Sharybin
b19155e76c Fix #34672: Image sampling line didn't use color management for byte buffers
This makes it so sample line (for all image editor, sequencer and compositor)
displaying managed color for byte buffers as well. It was simply not implemented
before.
2013-03-18 11:34:05 +00:00
Antony Riakiotakis
7049bf0598 Fix: Setting cursor to semitransparent objects will fail because of clip
alpha, added option when drawing depth to disable alpha clip override.
We use that in texture paint cursor now. Not too common but may be
useful for people dealing with cloning plugins.

Reported by kgeogeo on irc, thanks.
2013-03-17 20:24:47 +00:00
Campbell Barton
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
Campbell Barton
09c41019a8 use const pointers for file loading and booleans for animation system return values passed as pointers. 2013-03-17 19:13:04 +00:00
Campbell Barton
16b82845ee code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3 2013-03-17 18:30:31 +00:00
Antony Riakiotakis
e2b2d083e0 Fix "can't paint" bug no.1, painting with black on image editor did not
paint. Was own regression when optimizing colour operations. I will not
use an alpha bit mask since it may run into portability issues with byte
order.
2013-03-17 18:09:09 +00:00
Ton Roosendaal
66a35e089a Fix for "draw images as texture"
Zooming in on images in Image window now shows pixels again (was filtered).

Now the glaDrawPixelsTex() and glaDrawPixelsAuto() have an argument to 
define if images should zoom in with linear filter, or draw pixels.
2013-03-17 17:32:45 +00:00
Ton Roosendaal
ce7bde9677 Feature:
Image Editor and 3D view background image now use new automatic switching for
drawing GPU texture or OpenGL DrawPixels too. For large zoomed images
it gives massive speedup.
2013-03-17 16:54:06 +00:00
Antony Riakiotakis
0089830044 Fix evil own bug: paint_redraw accessed freed memory. Still doesn't
solve problem not being able to paint with black in image editor.
2013-03-17 16:53:35 +00:00
Ton Roosendaal
0a4b030145 New feature:
Automatic switching for drawing pixel buffers via glDrawPixels or using GPU textures

It works with a User Preference limit, in megapixels, to define whether to use
GPU or direct pixel drawing. Default is now initialized to 10 MP (4k buffers).

Especially for zooming out (draw smaller) texture drawing is much smaller. Also
Nvidia cards typically draw much faster with textures in general.

Added to node backdrop first now, the other editors follow in a next commit.

For coders: added new DNA function to initialize new struct variables, so you
don't have to sub-version files anymore.

   DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname") 

"filesdna" is the sdna description of the current file being versioned.
2013-03-17 14:38:58 +00:00
Campbell Barton
0d0291f6e1 code cleanup: incorrect sized array args, remove some redundant code. 2013-03-17 10:26:23 +00:00
Campbell Barton
1174c7d662 fix for missing NULL pointer checks and incorrect array free 2013-03-17 10:15:06 +00:00
Joshua Leung
a4e284091b Added descriptions for each constraint type, including common usage
restrictions/limits to reduce confusion
2013-03-17 03:45:15 +00:00
Antony Riakiotakis
84c7df0a2d Setting clone cursor is now an option for paint operator. This is not
too nice but it frees the Ctrl-LClick shortcut and allows us to set
invert mode for other paint tools, such as sharpen vs blur or invert
colour for draw brush. This conflict has existed on GSOC branch, better
resolve now before merging invert functionality.
2013-03-17 03:08:46 +00:00
Campbell Barton
baf3bb37a9 - ghost-sdl builds again.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
2013-03-16 20:49:46 +00:00
Campbell Barton
9e2db2dad4 revert own change: don't use memchr for strnlen, causes problems when the len is longer then the string data, instead use strnlen from freebsd.
also simplify empty string checks in logic_ops.c
2013-03-16 18:52:09 +00:00
Nicholas Bishop
0fedc6e45b Stop dyntopo updates from happening in masked areas
Fixes [#34348] Collapse short edges affects masked geometry
/projects.blender.org/tracker/?func=detail&aid=34348&group_id=9&atid=498

Fixed by disallowing topology updates on edges with a vertex masked at
50% or greater. This is a necessarily arbitrary choice; can't do
halfway updates for topology like we can with displacement.
2013-03-16 18:22:45 +00:00
Nicholas Bishop
994265b204 Fix sculpt view normal for transformed objects
Patch from Antony Riakiotakis, thanks!

Fixes [#34641] "Front Faces Only" option in SculptMode behaves weird
projects.blender.org/tracker/?func=detail&aid=34641&group_id=9&atid=498
2013-03-16 17:45:58 +00:00
Campbell Barton
fc11cf1581 fix for buffer overrun in reading bookmarks when a line was over 256 bytes. 2013-03-16 17:33:16 +00:00
Ton Roosendaal
0f8660064a Bug fix, irc reported:
Using new off-screen backbuffer selection failed for Lasso in editmode.
2013-03-16 17:12:39 +00:00
Campbell Barton
3be732f3ef don't create empty mesh object when separating if nothing is selected. 2013-03-16 16:38:18 +00:00
Campbell Barton
8a4a034325 patch [#34634] Select vertices without a group
from Kevin Mackay (yakca)
2013-03-16 16:11:50 +00:00
Campbell Barton
a38dbb5eac own error in recent knife-project changes. 2013-03-16 16:10:27 +00:00
Campbell Barton
afe9970d48 style cleanup 2013-03-16 14:42:05 +00:00
Campbell Barton
7ec47aa864 code cleanup: shadowing 2013-03-16 14:33:32 +00:00
Campbell Barton
a7b83837db fix for crash when using BM_face_calc_tessellation(), its not ensured that all tris will be filled in.
(effected knife project and laplacian smooth).
2013-03-16 14:18:32 +00:00
Joshua Leung
31356c86d3 Some more assorted fixes
* More duplicate/wrong comments (copy+paste errors)
* Brough Calculate/Clear Motion Path UI for bones more in line with the Object
version
2013-03-16 05:58:59 +00:00
Joshua Leung
9aa4396a97 Assorted anim editor fixes
* Click-select operators don't have "register" flag anymore
* Graph Editor click select can be undone, just like everything else
* "Current frame" -> "Current Frame" for consistency with rest of menu
2013-03-16 05:48:46 +00:00
Joshua Leung
150891605f NLA "Add Track" can now be used to add tracks to previously empty AnimData
blocks, provided the blocks in question are in fact selected.
2013-03-16 05:09:32 +00:00
Joshua Leung
7fc79615e0 Any ID Selector Template: ID Type dropdown now shows icon only as originally
intended

Finally, I've figured out a way to get the ID Selector Template to only show the
icon for the type of ID block (i.e. the intended design), instead of icon+text.
This improves the layout a bit, as previously the type selector and ID-block
pointer and label would all be the same sizes (roughly 1/3rd of the overall
width each), which meant that there wasn't much room left to actually see which
datablock had been selected.

Additionally, I've fixed a few more layout types which still didn't correctly
propagate the red-alert flags.
2013-03-16 03:59:03 +00:00
Joshua Leung
4db11a9e55 Assorted small fixes
* Incorrect comment (copy+paste error) in nla_edit
* Whitespace in rna_gpencil
* The icon for AnimData is now attached to its RNA definition
2013-03-16 02:53:45 +00:00
Joshua Leung
ce1a1d94d0 NLA Editor: Show the ID+AnimData block that the AnimData panel is showing the
active action for
2013-03-16 02:42:19 +00:00
Campbell Barton
a0351fd97e object converting curve/mball to a mesh would give invalid selection state (edges selected but nothing else).
add arg to BKE_mesh_calc_edges() so selecting newly created edges is optional.
2013-03-16 01:19:03 +00:00
Campbell Barton
db77fdc6ff fix for own mistake in using alloca in a loop, replace with BLI_buffer 2013-03-16 00:41:32 +00:00
Campbell Barton
1b994dbeb0 changes to BLI_buffer
- assert if BLI_buffer_at() is called with an out of bounds value.
- add BLI_buffer_resize_data() macro which resizes and returns a pointer to the new array.
- warn if missing call to BLI_buffer_free().
2013-03-16 00:12:14 +00:00
Campbell Barton
93836a24aa correct lasso, weightpaint select, was calling BLI_lasso_boundbox() twice. 2013-03-15 22:56:24 +00:00
Campbell Barton
d9c9209608 code cleanup: quiet some -Wshadow warnings, mix of obvious mistakes and harmless global/local naming conflict. 2013-03-15 22:55:10 +00:00
Antony Riakiotakis
6379dea41c minor cleanup and calculate rake angle before jittering or result
becomes essentially, random
2013-03-15 22:32:44 +00:00
Campbell Barton
6347f96f53 knife project improvements
When running in non-interactive mode, dont add a area draw callback or adjust the cursor, use a fixed snap value and don't use opengl lookups on faces.
Minor optimization - compare squared distances where possible.
2013-03-15 20:39:56 +00:00
Campbell Barton
511b181317 fix for error pasting into a color button (tried to read its rna index of -1) 2013-03-15 20:16:20 +00:00
Brecht Van Lommel
2d21e6521f Fix: multisample viewport drawing didn't work well with selection or particle
brushes, due to issues with color coded drawing or slow/buggy reading from such
a buffer on some systems.

In case multisample is enabled now, it uses an offscreen buffer for such drawing,
which is not multisampled and so should not cause issues. This does mean there is
some extra GPU memory usage when multisample is enabled, and we could optimize
triple buffer to work together here somehow to share buffers, but it's better than
having selection not working.
2013-03-15 19:56:33 +00:00
Brecht Van Lommel
88cf1a2bc7 Screen: add exit callback for area and region types, this gets called when
hiding or removing an area or region.
2013-03-15 19:56:29 +00:00
Campbell Barton
433c82649e knife project: improve selection inside/outside checks.
- use more accurate method to find if a face is inside projected lines.
- check faces intersect while expanding selection - in some cases this could result in the entire model being selected.
2013-03-15 19:38:42 +00:00
Campbell Barton
40bfce6616 use bool for knife, also scons tab/space mix. 2013-03-15 19:00:21 +00:00
Thomas Dinges
87602a6d2a Compile fix:
* Scons needed PThread include after recent movie clip changes.
2013-03-15 17:18:52 +00:00
Sergey Sharybin
08a8d11216 Further improvement for multi-threaded proxies
Handle sequences in a special case for dealing with
sequence sources.

Namely handle separate frames in separate threads,
but do disk read from a critical section since HDD
is not so friendly with lots threads requesting for
data from it.

Makes proxy building much faster than it was before.
2013-03-15 16:57:19 +00:00
Brecht Van Lommel
bcec00dddc Fix #34649: texture size limit user preference not working. 2013-03-15 16:16:11 +00:00
Campbell Barton
630798ba3c add in ifdef for WITH_LIBMV, correct own error passing float[2] as float[3] 2013-03-15 15:47:32 +00:00
Bastien Montagne
ee2b7b2c68 Fix/disambiguation for some "Clip" i18n messages. 2013-03-15 15:13:34 +00:00
Bastien Montagne
bc511df3da Small fix to previous commit: temp buffer for translation context needs to be initialized to relevant default value for operators... Also fixed not initializing those buffers in macro register function. 2013-03-15 15:12:46 +00:00
Campbell Barton
1d5d8bc934 knife project:
- selecting faces inside the cut now works properly
- improve epsilon for detecing if faces are inside a cut (still not perfect)
2013-03-15 14:43:09 +00:00
Bastien Montagne
284e59d608 Add the possibility to define the translation context for py rna classes (operators, panels and menus).
Thanks to Campell and Brecht for the reviews!
2013-03-15 14:32:29 +00:00
Campbell Barton
87919be4f6 fix for own bad mistake using alloca in a loop, also knife project wasnt selecting correctly. 2013-03-15 13:18:35 +00:00
Campbell Barton
03f02019f2 knife projection feature,
apart of 3d printing tools - use to cookie-cut text into a mesh.
2013-03-15 13:06:31 +00:00
Sergey Sharybin
6dc4ea34e4 Multi-threaded frame calculation for movie clip proxies
This commit implements multi-threaded calculation of frames
when building proxies. Both scaling and undistortion steps
are now threaded.

Frames and proxy resolution are still handled one-by-one,
saving files after every single step. So if HDD is not so
fast, this commit could have not so much benefit.

Internal changes:

- Added IMB_scaleImBuf_threaded which scales given image
  buffer in multiple threads and uses bilinear filtering.

- libmv's camera intrinsics now have SetThreads() method
  which is used to specify how many OpenMP threads to use
  for buffer distortion/undistortion.

  And yeah, this code is using OpenMP for threading.

- Reshuffled a bit libmv-capi calls and added function
  BKE_tracking_distortion_set_threads to specify number
  of threads used by intrinscis.
2013-03-15 11:59:46 +00:00
Campbell Barton
0807c976f4 code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,
also correct odd indentation.
2013-03-15 10:48:48 +00:00
Antony Riakiotakis
9d060b0333 Add missing operators from paint modes:
All modes:
-----------
Shift-S sets smooth stroke mode

Texture Paint/Vertex Paint:
----------------------------
R springs brush rotation control menu
Ctrl-F sets brush user rotation

Vertex paint mode was getting transform events with R, made sure no
transform events are handled for paint modes.
2013-03-15 10:45:43 +00:00
Lukas Toenne
c6d10b8416 Fix #34617, Track Position Node outputs had a limit value of 1 instead of the usual 0 (multiple connections allowed). Common problem with the explicit limit value in socket C templates, should be removed ... 2013-03-15 10:34:32 +00:00
Antony Riakiotakis
99ee23aec5 Support for rake in 2D image painting. 2013-03-15 09:48:51 +00:00
Sergey Sharybin
1ea16dcf9b Patch #34632: DPX/Cineon speed up
Done by Julien Enche (aka trap), thanks!

From the patch comment:
This patch speeds up Cineon/DPX file loading.
Some more checks are done in dpxOpen and cineonOpen functions so IB_test
flag can now be taken into account safely, and an unnecessary call to
IMB_rect_from_float has been removed.

DPX/Cineon file now loads around 3 times faster on my computer.

Own comment:
Ideally, IB_rect shall indeed indicate which buffers to load, however
currently all places which reads image uses this flag.

This fact already mentioned in OpenEXR reader and it shall be fine
to skip doing rect_from_float in readers themselves.
2013-03-15 09:46:37 +00:00
Sergey Sharybin
42660a204a Skip allocating any display buffer and starting any threads
in case image buffer contains byte buffer only and it's
color space matches display space.

It was already check for this case, but it happened later
in color management routines, which is needed for saving
files, but not fast enough for realtime playback of 4K.
2013-03-15 09:35:12 +00:00
Sergey Sharybin
9d5c3264da Skip doing frame undistortion if it's not needed for proxies. 2013-03-15 09:32:59 +00:00
Antony Riakiotakis
b961fda0b1 Fixes for 2d painting:
* Jittering accounts for zoom
* Smooth stroke accounts for zoom
* Expose smooth stroke in image paint editor.
2013-03-15 09:19:41 +00:00
Sergey Sharybin
85b6299747 Fix #34633: Merge First/Last crashes Blender
It was check happening when generating menu with available modes
for merge operator, but no checks happened when executing operator.

Since operator could be called from python or shortcut, it was
possible to bypass all the checks.
2013-03-15 07:08:00 +00:00
Antony Riakiotakis
55a05a9b03 Fix own mistake. Erroneously prefixed sculpt capabilities with sculpt_
before separating them in another struct. Thanks to Sebastian Koenig for reporting
2013-03-15 00:22:04 +00:00
Campbell Barton
113f2367a0 move polygon intersection out of BLI_lasso into BLI_math_geom since its a generally useful function.
adds:
- isect_point_poly_v2()
- isect_point_poly_v2_int()
2013-03-14 21:44:16 +00:00
Campbell Barton
a2a594fb36 BLI_linklist_free() was incorrectly taking MEM_freeN() as an argument, evidentially this works on x86 - but could cause issues later on.
add BLI_linklist_freeN() which MEM_freeN's each item.
2013-03-14 19:40:42 +00:00
Campbell Barton
7626101dc9 split up BKE_mesh_to_curve() into 2 functions, adding BKE_mesh_to_curve_ex() which doesn't do object type conversion. 2013-03-14 18:44:32 +00:00
Campbell Barton
a0dbd88311 converting a mesh to a curve was unnecessarily using tessface's.
use mpolys instead and simplify checks for wire edges.

Also rename BKE_mesh_from_curve() --> BKE_mesh_to_curve() since this function converts a mesh into a curve.
2013-03-14 18:35:21 +00:00
Sergey Sharybin
2b845d3b2a There was a regression in recent bugfix which touched Mix node.
This commit hopefully fixes that regression.
2013-03-14 16:25:32 +00:00
Campbell Barton
d92e32e4e7 use floats for knife tool internal mouse coord. 2013-03-14 14:46:59 +00:00
Bastien Montagne
93d7e3b442 Usual blenderplayer fix! :p 2013-03-14 14:05:41 +00:00
Campbell Barton
8dd2464626 minor knife refactor to prepare for running non interactively. 2013-03-14 13:58:56 +00:00
Campbell Barton
63d3594975 ui_def_but() allocating an extra byte in 'but->str' for no reason. 2013-03-14 11:29:15 +00:00
Campbell Barton
ffc8ecc587 use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.
also replace sprintf with strcpy when no formatting is done.
2013-03-14 10:39:18 +00:00
Sergey Sharybin
cf3b3a1ba2 Code cleanup: replace magic constant used for alpha ignore flag with a define. 2013-03-14 10:15:10 +00:00
Campbell Barton
0159647ada add BLI_strncpy_rlen(), a clone of BLI_strncpy() that returns the number of bytes copied.
also move doxy comments for BLI_string.h into the C file.
2013-03-14 10:07:05 +00:00
Sergey Sharybin
ccd05c33ed Fix #34616: Wrong face culling for curves with constructive modifiers
If curve object does have derived mesh, culling shall happen for
back faces, not front.
2013-03-14 09:50:29 +00:00
Campbell Barton
4dcd4e1a28 minor change to BLI_strncpy(). replace strlen() with BLI_strnlen(). 2013-03-14 09:49:20 +00:00
Campbell Barton
1158f06b57 code cleanup: de-duplicate view clipping function for paint and knife tool, minor changes to knife initialization. 2013-03-14 07:56:40 +00:00
Sergey Sharybin
9d896f8f84 Border rendering now works for all scenes used in compositor,
before this only active scene would be rendered with border.

When do_render_fields_blur_3d() is finished, it'll modify
render's display rect so it'll correspond bordered render
result placed on black backgrund. Actual border is stored
nowhere, which makes it only way to re-calculate disprect
for all other renders used in compo based on source. Not
so big deal actually.

Also needed to modify Cycles a bit, because before this
patch it used border settings from scene being rendered.
Now made it so render data is passing to external engines.

Using a property inside RenderEngine structure for this.
Not best ever design for passing render data, but this
would prevent API breakage. So now external engines could
access engine.render to access active rendering settings.

Reviewed by Brecht, thanks!
2013-03-14 07:38:37 +00:00
Campbell Barton
6a51379bf7 tweaks to clang so blender can build with -Werror 2013-03-14 07:25:54 +00:00
Joshua Leung
21dc93d275 Quick fixes for previous commit
* Missing word in tooltip for operator
* Ensure that filters are set appropriately so that effect is visible
immediately
2013-03-14 07:11:36 +00:00
Joshua Leung
07f2efe82f NLA Editor: Operator to add AnimData to selected objects so that they can appear
This commit introduces an operator in the Add menu - this operator ensures that
all selected objects have AnimData attached to them (even if they don't have any
actions/drivers yet). By doing this, these objects can at least appear in the
NLA Editor, which will allow them to have strips added to them in future without
having to create throwaway actions first (NOTE: there's still some stuff coming
to allow that).

Also, renamed NLA_OT_delete_tracks -> NLA_OT_tracks_delete
2013-03-14 06:34:02 +00:00
Joshua Leung
396758757b Bugfix: Filtering option in NLA Editor to include AnimData blocks with no
actions or NLA data attached was broken

Looks like a typo whcih somehow slipped in at some stage, as I remember that
this used to work at some point 2 years ago!
2013-03-14 06:30:18 +00:00
Campbell Barton
92d45811c3 fix reading out of buffer bounds for recent vertex paint commit. 2013-03-14 05:59:34 +00:00
Joshua Leung
0fa006cba1 Remove OPTYPE_REGISTER flag from click handler operator for anim editors
1) It made no sense to show this as the last operator which was used, since
these can only be used from the anim editors (and not the 3D View where this
panel appears most of the time)
2) Mouse select operators in other places didn't do this
3) There aren't really any editable parameters for this operator anyway
4) It's highly dependent on valid mouse coordinates as input.

Apart from that, undo still works fine, so no need to really keep this here.
2013-03-14 05:58:13 +00:00
Campbell Barton
aff410b558 style cleanup: odd indentation 2013-03-14 05:52:30 +00:00
Joshua Leung
5f92078d53 More AnimData selection fixes
* Not all supported datatypes would show up in the NLA Properties Region when
selected
* Clicking on the name part of the "Active Action" tracks now selects the
AnimData block that action is attached to
2013-03-14 05:44:56 +00:00
Joshua Leung
daf3fc02ad Bugfix: Selecting AnimData "expanders" in AnimEditors works again
Somewhere along the line, this functionality broke, even though the code to
handle these settings was still in place for many of these. The main implication
of this fix is that it should now be possible to select a particular AnimData
block, which makes it possible to do things such as changing the action
associated with that AnimData block (i.e. via the "Animation Data" panel in the
NLA Editor), as well as other operations which I've had on the todolist for a
while. Stay tuned!
2013-03-14 05:01:51 +00:00
Antony Riakiotakis
5684352858 Fix silly mistake that could lead to crash. Also, slight cleanup/rename
and comments
2013-03-14 03:47:20 +00:00
Antony Riakiotakis
d97050a7f6 Support for textures in vertex painting.
Developer notes: this commit does painting in sRGB space. Since colours
are stored im byte per component formats, expect this to have the usual
dark fringing issues. Speed wise vertex paint could use some
optimization, for instance we could store the screen space vertex
positions on initialization like we do for texture painting, but this is
for another time. Also noticed that vertex painting suffers from the
subsurf + mirror issue too :/

Apart from that it's quite exciting how easy it is to add support for
texturing now that proper abstractions for texture sampling have been
done :)
2013-03-14 03:42:17 +00:00
Antony Riakiotakis
0d70e8a4fd Two new Features:
* Support for Rake in projective paint (2D painting will be a separate
commit)
* Support for smooth stroke across all paint systems
2013-03-14 02:27:36 +00:00
Brecht Van Lommel
d9408f8800 Fix #34526: crash using mask modifier + subsurf + UV map. 2013-03-13 22:15:59 +00:00
Brecht Van Lommel
a4c19c62bf WM: remove "No (valid) startup.blend found" message printed on startup, can be useful for debugging but hide it for normal usage. 2013-03-13 20:00:39 +00:00
Brecht Van Lommel
dcbfa25bc8 Fix #34551: blender crash rendering with save buffers.
Problem was the new usage of access() on Windows, this doesn't accept X_OK. Also wrapped _waccess so that UTF-8 paths work.
2013-03-13 19:48:07 +00:00
Campbell Barton
962865d19f fix for 2 errors where the 2d arrays were used as 3d. (out of bounds read).
also minor code cleanup.
2013-03-13 18:10:05 +00:00
Brecht Van Lommel
5ff0daf1ac Fix #34492: clipping border not working with GLSL/matcap and Nouveau drivers. 2013-03-13 18:00:13 +00:00
Campbell Barton
1d73ee50a4 solidify modifier: thickness clamping helps prevent self intersections when there are small details on a larger model. 2013-03-13 17:31:26 +00:00
Brecht Van Lommel
385650974a Fix for build error with previous commit, seems the order of #includes matters here. 2013-03-13 17:30:31 +00:00
Brecht Van Lommel
5162a155af Fix #34481: camera focal length and sensor size did not use units yet, now they do.
I've added a separate camera unit type. It's a bit strange to have an exception for
this but it ensures units are shown in familiar millimeters and it also ensures
backwards compatibility.
2013-03-13 17:16:49 +00:00
Brecht Van Lommel
a3ad35cf3a Fix #34626: voxel data texture can't read > 2GB files on Windows.
Also fixed BLI_fopen not being used for AVI movie files, which meant AVI read
could fail reading a file from a path with special characters on Windows.
2013-03-13 17:16:47 +00:00
Campbell Barton
80de3192a7 attempt to quiet warnings for gcc4.2 2013-03-13 15:41:14 +00:00
Bastien Montagne
6d070e47c1 Fix [#34621] I18n Switch Issue When Gimbal and Rotation Manipulator On.
Real issue was that transform manipulators' code was calling TRANSFORM_OT_trackball with data (PointerRNA) from VIEW3D_OT_manipulator. That op has constraints props, while trackball has not. This created some kind of "ghost" properties, that showed up in redo panel.

Why this only segfaults in BLF_pgettext in 32bit builds remains a deep mystery (currently dusting out my 32 vbox to try to understand it...). BLF_pgettext is supposed to be pretty secure. :/
2013-03-13 15:27:54 +00:00
Ton Roosendaal
1d9b80fc3b Bug fix #34620
SHIFT+T (texture space transform) crashed in editmode. Not checking NULL pointer.
2013-03-13 15:11:45 +00:00
Bastien Montagne
ad9e675ee1 Fix [#34628] Shift-V (vertex slide) does no longer show "vertex slide:" for the user.
Own stupid mistake in r55214 refactor.
2013-03-13 14:56:17 +00:00
Campbell Barton
25e579c631 fix for minor glitch in recent addition to create faces from partial selections.
BM_edge_exists() would return an edge if both verts passed match, now assert instead.
2013-03-13 14:54:47 +00:00
Sergey Sharybin
f530adf73d Report timing compositor statistics when running in background mode.
This would help figuring out time spent on compositing, helpful for
render farms.
2013-03-13 14:50:36 +00:00
Sergey Sharybin
53735787ff Disable viewer nodes and previews when rendering in background mode
This node and operations are not useful in background mode anyway,
but calculating them could be really time-consuming especially
when working on 4K frames.
2013-03-13 14:50:33 +00:00
Brecht Van Lommel
47f6d7ff93 Fix node group drawing not taking into account DPI properly. 2013-03-13 14:19:57 +00:00
Brecht Van Lommel
136738029e Fix write past end of array in recent texture sampling refactoring commit, and
a small warning for double const keyword.
2013-03-13 14:19:55 +00:00
Brecht Van Lommel
4e86946c2b Fix wrong use of enum in UI code to reactive button on mouse over, this worked
only by accident.
2013-03-13 14:19:53 +00:00
Gaia Clary
020656ceba Outliner: recursive select/deselect visibility and selectable unconditionally 2013-03-13 14:12:17 +00:00
Howard Trickey
604bdb7f45 Fix bevel modifier bug #34611, limit bevel amount needed.
This is a quick fix that perhaps overestimates the point
of first geometry collision, but at least for now it should
allow models that used the old modifier and a too-big
bevel amount to not look awful.

The correct solution to this problem is much more involved
and I'll get to it later.
2013-03-13 14:08:12 +00:00
Gaia Clary
1ecf9ccf5f Outliner fix: selecting a bone did not unselect other bones when they are located in a hidden layer 2013-03-13 12:52:44 +00:00
Bastien Montagne
e89cf301cb Some small fixes found while investigating on bug [#34621] I18n Switch Issue When Gimbal and Rotation Manipulator On 2013-03-13 12:12:13 +00:00
Campbell Barton
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
Campbell Barton
2c8d3a969d patch [#34604] Add DPI read write for BMP and OpenEXR format 2013-03-13 07:16:53 +00:00
Campbell Barton
0488af00fe fix for crash with laplacian smooth when unselected ngons were used, volume calculation assumed unselected face were not ngons.
- added convenience function BM_face_calc_tessellation() to get triangles from an ngon.
- expose volume function as BM_mesh_calc_volume().
2013-03-13 06:32:08 +00:00
Campbell Barton
56771becd0 code cleanup: remove bmesh subdivide header, all definitions can be included in bmo_subdivide.c.
also only initialize random numbers when fractal option is set.
2013-03-13 05:33:23 +00:00
Campbell Barton
839b07fe31 style cleanup: also remove unused defines in paint_image.c 2013-03-13 05:23:53 +00:00
Antony Riakiotakis
acd3bef34e Texture sampling function refactoring:
ALERT! POSSIBLE BREAKING COMMIT, ESPECIALLY FOR SCULPT!

Separate the sculpt sampling function so that it can be reused
from other paint systems. This includes updating of the relevant
coordinates for anchored and rake style brushes, which are now
being updated as part of the stroke system.

I left only code for area-style brush texture mapping in sculpt
code, since it requires a few data structures not present on other
paint systems.

This commit makes it almost as easy to support rake on other systems as
exposing the python UI for it. Also it makes it totally possible to
have texture painting capabilities in vertex paint too :) These commits
will follow very soon.

Also, even if I did my best to keep the code from breaking, (even fixed a
leftover bug from coordinate changes) this is a big change. Please test!
2013-03-13 03:46:22 +00:00
Campbell Barton
153b63e0fd style cleanup 2013-03-12 21:46:33 +00:00
Sergey Sharybin
e6cdee370e Patch #34204: [Render Animation] Fails with "Error: Specified sample_fmt is not supported" with ogg vorbis
Patch by Jehan Pages (pardon for mis-typing, emacs-nox works not so good with
urf-8 buffers here), with some own modifications. Thanks!

From the patch tracker:

The problem is because of several versions of ffmpeg, but even more because of
the fork situation libav/ffmpeg. So there are some installed versions out there
where you *must* use a float sample for some codec; whereas oppositely on some
other installations, you *must* use the int sample. So for some people, one
works not the other, and reciprocally.

As a consequence, you can't just have a switch codec-based, like in current
code, which decides on the float or int implementation, you must necessarily
have a runtime test because you won't know until then if ogg vorbis will use
one or another sample (note: that's true also for AC3 as I fixed the exact same
bug in DVDStyler for AC3 encoding a few months ago; and I guess it would be same
for AAC).

Some notes from self:
- New FFmpeg requires using FLTP for AAC, AC3 and Vorbis, it's not supported
  by audaspace and result in this case would be just wrong. Throw an error
  in cases FLTP is trying to be used.
- Moved strict_std_compliance a bit upper. When we'll support FLTP both
  FLT and FLTP for AAC would need to be using FF_COMPLIANCE_EXPERIMENTAL.
- It is nice to have such check of supported by codec formats anyway.
2013-03-12 16:57:14 +00:00
Sergey Sharybin
d0af1101fb Patch #34569: Enable PNG Codec for video output
By Gottfried Hofmann, thanks!
2013-03-12 16:09:23 +00:00
Campbell Barton
f6025018f5 change defaults for window state on X11 (yet again), after further discussion.
instead use a fixed size as a default, clamp by the desktop size and add some padding (to account for title bar and panel).
2013-03-12 14:55:52 +00:00
Sergey Sharybin
984bd7ffa8 Print compositor execution statistics when in background mode
This will print memory usage, mapped memory usage, memory peak,
compositing tree name and number of finished tiles to stdout
when blender is rendering in background mode.

This makes compositor a less blackbox and should help trouble
shooting issues happening during 4K ToS project.
2013-03-12 14:28:52 +00:00
Sergey Sharybin
96412b711e Fix for strict compiler's flags 2013-03-12 14:06:18 +00:00
Sergey Sharybin
ebcb4b5e75 Fix for crash in special cases when mixing translate node with other
Issue was caused by calling ensureDelta from initexecution, which will
read pixels from an input and it could read from non-initialized
operations.

Issue was originally introduced in svn rev54235 which added ensureDelta
to translate's initExecution, but since rev54349 this call seems to be
doing nothing.
2013-03-12 14:04:58 +00:00
Bastien Montagne
b3ff0d6d2a Temp fix for stupid -Wformat-security issue.
Also makes more use of BLI_snprintf, and makes more consistent code acrross all "header strings" generation in transform.c.
2013-03-12 13:18:39 +00:00
Gaia Clary
d74e029954 Ouliner: Added recursive setting of (visibility/selectability) for bones (Edit- and Object-mode) 2013-03-12 13:03:58 +00:00
Campbell Barton
eefee7a25e replace sprintf -> strcpy where its not needed. 2013-03-12 12:47:57 +00:00
Sergey Sharybin
b7b14ac186 Changing image ID datablock fomr browser in Image node didn't change output sockets
Which lead to either multilayer sockets hanging around when switching image from
multilayer to singlelayer, or missing layers outputs when switching from single
to multilayer image.
2013-03-12 11:03:50 +00:00
Sergey Sharybin
ae09d2f9d8 Fixe related on #34608: MultiLayer OpenEXR (from Maya) - passes lost in Compositor Image Node
imb_exr_split_channel_name didn't set any value to layer and pass names,
leaving them uninitialized.

This is likely solves initial report, but will know for sure after testing
windows build only.
2013-03-12 10:34:14 +00:00
Campbell Barton
ee3d910f8f code cleanup: quiet struct gcc warnings, also use more conventional names for bmesh dissolve. 2013-03-12 08:50:02 +00:00
Campbell Barton
d9960dba31 fix own regression in 2.66 [#34610] Text editor: Syntax highlighting freezes 2013-03-12 08:46:12 +00:00
Sergey Sharybin
e84153a91c Fix compilation error after recent changes to strict gcc flags
Dudes, please try building blender with all default features
before doing such a commits. It helps just a lot when bisecting
issues later.

Also solved const qualifier discard happens in recent monofont
commit.
2013-03-12 08:24:36 +00:00
Sergey Sharybin
9c0eecbf10 Fix #34599: Mask nodes stop working if output is later piped through HSV node
Issue was caused by the fix for #33650 which changed way to check whether
operation resolution is set or not from checking dimensions are zero to
setResolution was ever called.

Such change lead to conflict with MixBase operation (used for Mix node) which
uses temporary zero resolution to check whether input socket resolution is
known. This leads to zero resolution setting to that branch of tree. After this
resolution will never set to it's actual value.

For now solved by changing logic how MixBase operation detects resolution.
Namely instead of using trick with temporary zero resolution and calling
determineResolution for all inputs, and then call base class's method to
determine resolution just once again, check whether input socket is connected
and if so use it's resolution.

Shall not be regressions for real-life trees, but keeping an eye on this and
doing more tests is for sure welcome.
2013-03-12 08:24:30 +00:00
Irie Shinsuke
5792e77239 Patch [#34373] Use i18n monospace font in Text editor and Python console
This patch allows Blender to display i18n monospace font in the text
editor and the Python interactive console. Wide characters that occupy
multiple columns such as CJK characters can be displayed correctly.
Furthermore, wrapping, selection, suggestion, cursor drawing, and
syntax highlighting should work.

Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic

To estimate how many columns each character occupies, this patch uses
wcwidth.c written by Markus Kuhn and distributed under MIT-style license:

  http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

wcwidth.c is stored in extern/wcwidth and used as a static library.

This patch adds new API to blenfont, blenlib and blenkernel:

BLF_get_unifont_mono()
BLF_free_unifont_mono()
BLF_draw_mono()
BLI_wcwidth()
BLI_wcswidth()
BLI_str_utf8_char_width()
BLI_str_utf8_char_width_safe()
txt_utf8_offset_to_column()
txt_utf8_column_to_offset()
2013-03-12 07:25:53 +00:00
Campbell Barton
763d4b2394 ruler: disable rotate with ruler drawing, was drawing too pixelated and hard to read. 2013-03-12 06:25:06 +00:00
Campbell Barton
8661e820f9 bmesh: dissolve, avoid unnecessary loop in test_extra_verts(), also minor code cleanup. 2013-03-12 05:48:30 +00:00
Campbell Barton
539d7d460d bmesh: maintain active face when dissolving. 2013-03-12 05:36:43 +00:00
Campbell Barton
660be3da39 use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations which have been removed. 2013-03-11 20:27:38 +00:00
Thomas Dinges
8560b141eb Fix for [#34598] Modifier-Icon in Outliner does not appear
* OBJECT_OT_make_links_scene did only trigger an 3D View update which was insufficient for Outliner (modifiers for example) and also some parts inside the Properties Editor (Mesh Data, Material Data).
2013-03-11 19:50:11 +00:00
Antony Riakiotakis
42b9c68534 Minor cleanup: We always use colour correction now for float buffers. Get rid of flag variable. 2013-03-11 18:40:43 +00:00
Antony Riakiotakis
0a3382c8e0 Fix #34589. There was no space conversion being done between layers in
different colour space when using the clone brush.
2013-03-11 18:11:07 +00:00
Campbell Barton
e6dcf9504e code cleanup:
- move recursive bone/parent check into ED_armature.h
- remove unused vars
- use const for paint vector args.
2013-03-11 16:23:33 +00:00
Gaia Clary
1672ac25ca Ouliner: Added recursive select of (visible) bones (Edit- and Object-mode) 2013-03-11 16:02:16 +00:00
Bastien Montagne
f09f2d1c31 Fix more UI i18n issues (reported by Leon Cheung). 2013-03-11 15:01:03 +00:00
Bastien Montagne
5b53a17bfb Colormanagement: Fix issue with colorspaces' description too short, and reduce usage of magic numbers. 2013-03-11 11:15:05 +00:00
Sergey Sharybin
28857e8c9e Fix #34511: Invalid Audio/Video codec combination produces hung filehandle 2013-03-11 11:09:57 +00:00
Bastien Montagne
4daef64986 Fix more UI i18n issues (reported by Leon Cheung and Lockal).
We have a glicth with colormanagement's spaces descriptions, though, looks like they are clamped at 64 chars (see raw space), will see that later, if it’s solvable.
2013-03-11 09:06:49 +00:00
Campbell Barton
34f3dc43e7 code cleanup: pep8 & minor changes 2013-03-11 02:19:58 +00:00
Antony Riakiotakis
722ada58fc Jitter: Change UI. Now use lock icon to indicate relative jitter, tied
to brush size, and unlock icon to indicate absolute jitter untied to
brush size, in screen pixels. Also relative jitter now has soft UI limit
of 2.0 and a hard limit of 1000 times the size of the brush. Should be
enough for the most vivid imaginations...I hope!
2013-03-11 01:46:22 +00:00
Antony Riakiotakis
38feedcaac Feature request for all paint systems that support it: Jittering in
absolute coordinates. This allows an artist to lower the brush radius
while keeping the spread of the brush constant. A toggle under the
jitter slider provides the option to switch between relative/absolute.
2013-03-10 20:05:18 +00:00
Miika Hamalainen
5a981db3ec Fix [#34561]: Possible smoke crash if smoke flow had lower density than adaptive domain "threshold". 2013-03-10 19:12:40 +00:00
Miika Hamalainen
0c93ef3ba9 Fix: Vertex weight color calculation tried to use NULL pointer when called through DM_update_weight_mcol(). (Introduced in r55062.) 2013-03-10 19:10:20 +00:00
Antony Riakiotakis
623902ac51 Fix: stroke spacing fails in image editor, we need to account for
zooming because spacing used to happen in unscaled screen space
2013-03-10 18:46:31 +00:00
Antony Riakiotakis
ca5f7b778c More cruft remove for 2d painting. Remove functions from brush interface
that were in fact 2d painting specific. Also remove old stroke managing
function completely.
2013-03-10 18:05:13 +00:00
Brecht Van Lommel
5186e3393c Fix scons build error after recent commit, missing include. 2013-03-10 17:52:29 +00:00