Commit Graph

47512 Commits

Author SHA1 Message Date
Brecht Van Lommel
d0ffbeec73 Cycles OpenCL: a few fixes to get things compiling after kernel changes,
for Apple OpenCL on OS X 10.8 and simple AO render.

Also environment variable CYCLES_OPENCL_TEST can now be set to CPU, GPU,
ACCELERATOR, DEFAULT or ALL values to test particuler devices.
2013-05-09 14:05:40 +00:00
Brecht Van Lommel
d236b4d60f Cycles bump node: change the Strength value to work better, previously it would
give results that were either too weak or too strong, this makes it give more
predictable results. The downside is that it breaks backwards compatibility but
the previous behavior was almost broken.
2013-05-09 14:05:37 +00:00
Campbell Barton
d326d92b2f fix [#35280] blender crashes when setting Environment Map imagefile 2013-05-09 14:01:42 +00:00
Campbell Barton
675f845116 use standard name for operator properties - 'props'. 2013-05-09 13:05:36 +00:00
Campbell Barton
4c042f2145 bmesh: optimize bmesh_vert_separate, redice allocs (best cast it wont do any allocs).
gives approx 16% overall speedup to edgesplit modifier.

also reduce size of smallhash stack, was 521, which got doubled and was quite large on the stack. reduce to 64.
2013-05-09 12:46:35 +00:00
Lukas Toenne
56485b6562 Upgrade for the add_search node operator. This now uses the same basic system as the regular add_node operator, with enum items generated from the common node categories system (nodeitems_utils module). This means that any node listed in the regular node Add menu can now also be added via searching, including node groups and the like. The search operator also uses the subsequent transform to make insertion a bit more streamlined. 2013-05-09 11:43:48 +00:00
Campbell Barton
2e0f741d01 can't use alloca in inline functions (fills up stack - I thought compiler would be smart here).
also reserve the exact number of vert/face/edge/loops when creating a bmesh during undo.
2013-05-09 11:42:24 +00:00
Campbell Barton
278240f4b0 bmesh: avoid using BLI_array macros for every face when converting to bmesh, replace with alloca 2013-05-09 10:44:38 +00:00
Campbell Barton
1e784c54cd bmesh speedup: skip free-realloc while running CustomData_bmesh_merge() when nothing is changed (happens quite often that there is nothing to do). 2013-05-09 10:41:05 +00:00
Lukas Toenne
efcfe88adc Fix for add_node operator: needs to have SKIP_SAVE set for the settings collection to prevent it from re-using settings from a previous call. This would otherwise lead to python exceptions when those properties don't exist for the other node type (point in case: node_tree only is defined for group nodes). 2013-05-09 10:13:13 +00:00
Thomas Dinges
c1f408c058 Partial revert of own commits r56604 and r56603:
* Reverted the changes to code comments, as suggested by Campbell. It makes it more hard to follow.
* Only keep changes to actual UI messages.
2013-05-09 10:03:38 +00:00
Lukas Toenne
3fb67ac16d Fix for do_versions bug with node groups: The special case of direct input-to-output connections was not handled correctly. In this case both the tonode and fromnode pointers in old node groups are NULL. 2013-05-09 08:29:59 +00:00
Lukas Toenne
89d77c538a Fix suggested by Campbell Barton: use %r instead of %s when building the python expression for the node operator settings to ensure correct escaping. 2013-05-09 08:05:02 +00:00
Campbell Barton
6f8c29ab0b fix for 2 errors introduced since release
- shape key NULL pointer dereference.
- use uninitialized variable for bmesh free.

also update credits and merge dissolve flag assignment.
2013-05-09 07:02:51 +00:00
Campbell Barton
279a2a1916 fix rna_info, python method to C function wasn't being tested for. (broke changelog generator) 2013-05-09 02:50:59 +00:00
Campbell Barton
8771a9f861 update autogenerated changelog. also correct typos in the generator. 2013-05-09 01:58:49 +00:00
Campbell Barton
3d95873cf6 fix [#35257] Brige > Merge sometimes flips result 2013-05-08 23:14:27 +00:00
Dalai Felinto
102c0d76e9 bugfix: [#31757] setGLSLMaterialSetting has no effect
original patch by me, with contribution from HG1 and Florian Völker

bug introduced in rev. 40113
2013-05-08 21:43:35 +00:00
Thomas Dinges
e0edac4952 UI naming consistency:
* ShapeKey -> Shape Key. Was called "Shape Key" in most places already.

Pointed out by Dalai, thanks!
2013-05-08 21:41:47 +00:00
Thomas Dinges
b98550590b UI naming consistency:
* DopeSheet -> Dope Sheet. No need to glue the words together. 

Only changed comments and UI strings, no functional changes. Request by Dalai Felinto.
2013-05-08 21:05:52 +00:00
Thomas Dinges
01dc4b034f Cycles / Tile Rendering:
* Code refactor of tile ordering to simplify the code and avoid some branching. 
* Changed the Center method, so it really follows center -> corners, instead of the BI method, which was confusing sometimes.
2013-05-08 19:49:09 +00:00
Brecht Van Lommel
360a86d658 Attempt to fix OS X build with 10.6 SDK, was not working due to recent fullscreen bug fixes. 2013-05-08 19:37:36 +00:00
Thomas Dinges
872a8ed1bf Cycles / Hair rendering:
* Enable hair rendering on the GPU.

Patch by Stuart Broadfoot, with small tweaks by me, to only enable it on sm_20 and above.
2013-05-08 17:33:25 +00:00
Thomas Dinges
9037a2d3ab Blender 2.68 release cycle begin:
* BCon1, Alpha. Let's have an awesome one!
2013-05-08 17:23:56 +00:00
Lukas Toenne
a3c82d4cde Updated the custom_nodes.py template script to reflect socket draw API changes in r56584 and r56585. 2013-05-08 16:17:04 +00:00
Lukas Toenne
8deba33497 Fix for node group user count: since node group pointer uses an explicit setter callback it has to do user count increment/decrement manually. 2013-05-08 16:00:08 +00:00
Lukas Toenne
a092611f67 Fix for node item polling: recursion check was the wrong way around, needs to test is the parent tree is inside the group. 2013-05-08 15:41:09 +00:00
Lukas Toenne
d7c74acab1 Added filter to the node group items callback to remove recursive node groups right from the start. These tree pointers would be polled out internally as well, but this way they don't show up in the menus in the first place. 2013-05-08 15:41:07 +00:00
Lukas Toenne
8863222a90 A bit more pythonic way of using the items callback in node categories. The category.items attribute is now a function taking a context parameter instead of a property. This can be used for checking validity, e.g. for doing node group recursion checks, and filter out unusable items. 2013-05-08 15:41:05 +00:00
Lukas Toenne
8542d97f73 2 fixes for node group node_tree pointer property: Make sure the nodeGroupPoll function (which checks for recursion) is used both in the poll callback as well as the actual pointer assignment (set). The poll callback doesn't seem to be used when directly setting the node_tree pointer from the API, so to make sure no dangerous recursion situation can happen this needs a second check. 2013-05-08 15:41:01 +00:00
Lukas Toenne
3234f7e497 Expose the data type property of node group interfaces for easier comparison in python. 2013-05-08 15:40:58 +00:00
Lukas Toenne
3ebe7d970e Moved a couple of common properties into the NodeAddOperator base class to avoid repetitive code. A new operator node_add_and_link is another variant that first creates a node and them connects a specific socket to an existing one (defined by context pointer). 2013-05-08 15:40:53 +00:00
Lukas Toenne
451a32070c Removed the unused socket template system from the bpy_types Node base class (it interferes with the input_templates/output_templates functions from C nodes). This can be reimplemented in a nicer way for pynode subclasses later on, but should not be part of the basic Node class. 2013-05-08 15:40:51 +00:00
Lukas Toenne
ee950c9dcb Exposed the node socket templates of C nodes in RNA by means of a classmethod. This will allow the node link menu to determine feasible socket connections before an actual node instance is created. 2013-05-08 15:40:49 +00:00
Lukas Toenne
701aa8b59b Removed the add_group_node operator, this is now integrated into the generic node_add operator. The group node tree pointer is then part of the settings dictionary. 2013-05-08 15:40:46 +00:00
Lukas Toenne
33e990109b Expose the HIDE_VALUE flag of node sockets in RNA. 2013-05-08 15:40:44 +00:00
Lukas Toenne
bfa97b4710 Workaround for C nodes: In order to make registerable RNA methods of the standard C nodes (e.g. poll or draw_buttons) available in python scripts, they need a specialized Node subtype (called NodeInternal). This is necessary because bpy omits any registerable functions of RNA types in the generated python classes, relying instead on using the supposed native implementation in a registered python class. Since the standard shader/compositor/texture nodes in Blender are not registered but directly created in makesrna they lack all registerable function in the associated python types. The NodeInternal RNA subtype replaces the registerable functions of the base Node type to solve this issue. 2013-05-08 15:40:40 +00:00
Lukas Toenne
6fe753c11b Extended the draw callback API for node sockets with an explicit text parameter, instead of always using the sock->name string. This can be useful for drawing the socket values separate from the label, e.g. in the node view template. 2013-05-08 14:58:41 +00:00
Lukas Toenne
672d393517 Change to socket draw functions: instead of always only drawing the socket label for connected sockets, leave this check up to the socket draw function itself. This allows future socket types to draw buttons or other info in all cases and handle connected/unconnected state more flexibly.
The drawinputfunc/drawoutputfunc callbacks in bNodeType are pretty much empty wrappers now and should be removed at some point. This per-node differentiation should rather be implemented as a specialized socket type if necessary. The only use case for this feature that remains is the file output node in compositor, which displays shortened file format info for each socket.
2013-05-08 14:58:37 +00:00
Campbell Barton
0ee45c9301 more optimal method of calculating the normal for the solidify modifier.
When adding 2 unit length vectors, the length can be used to calculate the angle.
2013-05-08 14:33:02 +00:00
Sergey Sharybin
f25e7d62b3 Mask modifier for sequences
This modifier uses a mask set in the modifier settings
and multiplies strip by it. Alpha channel will also be
multiplied by mask, which makes it easy to mask some
objects on footage and alpha-over them in sequencer.

Actually, this modifier sets alpha for byte strips
directly (since byte is always straight alpha) and
multiplies float buffer by mask (flaots are premulled)
so in both cases masked strip could be easy alpha-overed
without any artifacts.

It uses own structure with only SequenceModifierData
property in to preserve both forward and backwards
compatibilities (using new structure ensures modifier
will be ignored on load in older blenders, the same
happens for mesh modifiers actually).

Request from Pablo Vazquez.
2013-05-08 14:20:57 +00:00
Lukas Toenne
89eb80fb68 Fix for #35253, Cannot animate X, Y, Z values in nodes with vector sub-menu. The "component menu" template used for these socket buttons opens a popup, but this ui function does not support RNA info directly. Setting the uiBut rna pointer directly solves it. 2013-05-08 14:18:09 +00:00
Campbell Barton
7bd7da7cc6 code cleanup: dissolve - use iterator macros, remove unused function. 2013-05-08 14:08:37 +00:00
Campbell Barton
7dbf6d513e mesh dissolve vertices: option to split off corners of surrounding faces, makes the result more localized to the area around the vertex. 2013-05-08 14:01:38 +00:00
Campbell Barton
8193d83cd9 split dissolve into 3 different operators (face/edge/vert). 2013-05-08 13:48:57 +00:00
Brecht Van Lommel
4d842df17e Fix #35219: blender internal auto ray bias to avoid the terminator shadow
problem was giving light flickering on a mesh with animated hair strands.

Now strands are not used to compute this auto bias excluded from this, from
tests it does not seem to be helpful for hair and only gives issues.
2013-05-08 13:23:20 +00:00
Brecht Van Lommel
a07dcd67eb Fix #35240: command line -t number of threads option did not work for cycles.
Now it works for blender internal, cycles and other multithreading code in
Blender in both background and UI mode.
2013-05-08 13:23:17 +00:00
Brecht Van Lommel
3e763d7e4d Fix #35246: cycles has no simple way to combine bump and normal mapping. Now
the Bump node has a Normal input, so you can chain it after a Normal Map node.
Note that normal mapping always has to be done first because it is tied to the
particular mesh surface and tangents.
2013-05-08 13:23:13 +00:00
Campbell Barton
28617bd710 fix for recent commit, WITH_GUARDEDALLOC wasn't enabled for makesrna, makesdna. 2013-05-08 13:19:55 +00:00
Sergey Sharybin
a9a0e2d98f Fix #35093: New Basis shape key doesn't act as Basis
Made it so Move Shape Key ensures first key is a refkey,
so now it's possible to change basis key from the interface.

It's still needed to manually teak key's relative_key,
not sure whether there's a reliable automated way to tweak
this value when bassi key is changing.
2013-05-08 13:16:45 +00:00