7 years agostyle cleanup
Campbell Barton [Sat, 11 May 2013 01:06:01 +0000 (01:06 +0000)]
style cleanup

7 years agoFix #35262: assiging shortcuts from e.g. delete or selection mode menus did not
Brecht Van Lommel [Fri, 10 May 2013 23:41:41 +0000 (23:41 +0000)]
Fix #35262: assiging shortcuts from e.g. delete or selection mode menus did not
work anymore. This was due to a bugfix to show missing shortcut keys for e.g. the
mesh > vertices > separate menu. Both should work now.

7 years agoCycles / Closures:
Thomas Dinges [Fri, 10 May 2013 22:41:24 +0000 (22:41 +0000)]
Cycles / Closures:
* Avoid some unnecessary re-declarations of closure data and simplify *_setup() functions a bit.

7 years agoFix #35289: UV layout export to image was extremely slow for large meshes. This
Brecht Van Lommel [Fri, 10 May 2013 22:05:47 +0000 (22:05 +0000)]
Fix #35289: UV layout export to image was extremely slow for large meshes. This
was due to slow implementation of slice operation for things like mesh uv data.
Made that faster now for cases where the internal storage is an array.

7 years agoFix #35273: click in empty space to deselect as used by the Maya keymap gave
Brecht Van Lommel [Fri, 10 May 2013 20:49:16 +0000 (20:49 +0000)]
Fix #35273: click in empty space to deselect as used by the Maya keymap gave
a python error when used in pose mode.

7 years agoFix #35281: search menu buttons (with an X on the right side to clear) had text
Brecht Van Lommel [Fri, 10 May 2013 20:34:35 +0000 (20:34 +0000)]
Fix #35281: search menu buttons (with an X on the right side to clear) had text
overlapping the X icon if the text was long.

7 years agoFix #35292: edge slide slow with big image in image editor. Avoid redrawing the
Brecht Van Lommel [Fri, 10 May 2013 20:17:18 +0000 (20:17 +0000)]
Fix #35292: edge slide slow with big image in image editor. Avoid redrawing the
image editor during slide like other operators, instant feedback can be nice but
is not so important here and we don't have notifiers fine grained enough to avoid
full redraws.

7 years agoFix #35284: outline name edit textbox did not show properly in some cases. Also
Brecht Van Lommel [Fri, 10 May 2013 19:54:32 +0000 (19:54 +0000)]
Fix #35284: outline name edit textbox did not show properly in some cases. Also
fix issues with its size not scaling with DPI.

7 years agoCouple fixes for my previous commit:
Miika Hamalainen [Fri, 10 May 2013 19:30:08 +0000 (19:30 +0000)]
Couple fixes for my previous commit:
- In some cases smoke flow could have 1 cell clipped off its sides.
- Forgot to re-enable openmp for emission code.

7 years agoFix #35296: particles crash with long object name.
Brecht Van Lommel [Fri, 10 May 2013 17:14:07 +0000 (17:14 +0000)]
Fix #35296: particles crash with long object name.

7 years agoFix for version patch in recent smoke commit, was using && instead of &.
Brecht Van Lommel [Fri, 10 May 2013 16:57:20 +0000 (16:57 +0000)]
Fix for version patch in recent smoke commit, was using && instead of &.

7 years agoCycles: bump node changes to add a Distance input that controls the overall displacement
Brecht Van Lommel [Fri, 10 May 2013 16:57:17 +0000 (16:57 +0000)]
Cycles: bump node changes to add a Distance input that controls the overall displacement
distance, and an Invert option to invert the bump effect.

7 years agoSmoke: Add new "Full Sample" option to high resolution smoke panel.
Miika Hamalainen [Fri, 10 May 2013 16:18:00 +0000 (16:18 +0000)]
Smoke: Add new "Full Sample" option to high resolution smoke panel.

This is hopefully the ultimate solution against smoke blockiness near emitter.

Previously high resolution flow/emitter voxels were generated based on the low resolution ones. So if you had 32 resolution and 4 division high resolution, it still used smoke flow generated from those 32 resolution voxels. Now I introduced a new sampling method called "Full Sample" that generates full resolution flow for for high resolution domain as well.

Read more about it in my blog post:

Also changed "quick smoke" operator default voxel data interpolation mode to "Cubic B-Spline" to smoothen out it even more.

7 years agoSet scene frames operator for clip editor.
Sergey Sharybin [Fri, 10 May 2013 15:56:32 +0000 (15:56 +0000)]
Set scene frames operator for clip editor.

This operator will set scene's start/end frames to
match clip's start frame and footage duration.

Available in Clip panel in clip editor's toolbox.

7 years agoFix for recent bugfix with anisotropic node crash, could do invalid memory access.
Brecht Van Lommel [Fri, 10 May 2013 15:10:54 +0000 (15:10 +0000)]
Fix for recent bugfix with anisotropic node crash, could do invalid memory access.

7 years agoFix #35270: files with numbers higher than 2147483648 or with different numbers
Brecht Van Lommel [Fri, 10 May 2013 14:52:23 +0000 (14:52 +0000)]
Fix #35270: files with numbers higher than 2147483648 or with different numbers
of leading zeros but otherwise the same would show in random order in the file
browser. Selecting an item would change the order of all the items.

Problem was that it was comparing by parsing the number into an int, which has
only limited precision and does not care about the number of leading zeros. Now
do the comparison directly on the string.

7 years agoFix #35267: cmd+v, cmd+c on OS X for copy/paste worked in some editors like the 3D
Brecht Van Lommel [Fri, 10 May 2013 13:47:28 +0000 (13:47 +0000)]
Fix #35267: cmd+v, cmd+c on OS X for copy/paste worked in some editors like the 3D
view and text editor but not in the animation editors, node editor and sequencer.

7 years agoCycles: add Use Surfaces and Use Hair option to render layers, to disable rendering
Brecht Van Lommel [Fri, 10 May 2013 13:34:49 +0000 (13:34 +0000)]
Cycles: add Use Surfaces and Use Hair option to render layers, to disable rendering
of hair and surfaces, similar to blender internal options.

7 years agoCode cleanup / Cycles:
Thomas Dinges [Fri, 10 May 2013 12:51:30 +0000 (12:51 +0000)]
Code cleanup / Cycles:
* Change some more if / else if conditions to switch / case.
* Avoid an unneeded variable casting in phong_ramp closure.

7 years agoFix #35278: textures nodes Mix RGB node did not have a Use Alpha option like
Brecht Van Lommel [Fri, 10 May 2013 12:39:11 +0000 (12:39 +0000)]
Fix #35278: textures nodes Mix RGB node did not have a Use Alpha option like
the compositing node. Note the shader nodes can't have this because color
sockets there are only RGB, not RGBA.

7 years agoFix #35269: compositing setup with only file output node and no composite node
Brecht Van Lommel [Fri, 10 May 2013 12:27:18 +0000 (12:27 +0000)]
Fix #35269: compositing setup with only file output node and no composite node
refused to render. It's not possible to actually see the compositing result
in the render result without that but might as well work.

7 years agoFix for #35291, Deleting 'Group Output' node in compositor causes Segfault. A group...
Lukas Toenne [Fri, 10 May 2013 12:19:42 +0000 (12:19 +0000)]
Fix for #35291, Deleting 'Group Output' node in compositor causes Segfault. A group without an output node in compositor would leave the original Node instance in the graph with outgoing connections. This causes trouble because the Node is expected to be a NodeOperation. Now group nodes always get disconnected and if no output node is present will use the default group output values (which is slightly less confusing than using input values from connected nodes).

7 years agoFix #35261: double clicking the up arrow in the file browser to go up multiple
Brecht Van Lommel [Fri, 10 May 2013 12:16:12 +0000 (12:16 +0000)]
Fix #35261: double clicking the up arrow in the file browser to go up multiple
directories fast would start drag and drop. Disabled drag on those items now.

7 years agouse unsigned ints for edgehash
Campbell Barton [Fri, 10 May 2013 12:06:40 +0000 (12:06 +0000)]
use unsigned ints for edgehash

7 years agoFix #35282: cycles color ramp set to constant interpolation did not work well.
Brecht Van Lommel [Fri, 10 May 2013 11:44:24 +0000 (11:44 +0000)]
Fix #35282: cycles color ramp set to constant interpolation did not work well.

7 years agoFix #35272: cycles GPU crash with anisotropic shader in group node.
Brecht Van Lommel [Fri, 10 May 2013 11:31:57 +0000 (11:31 +0000)]
Fix #35272: cycles GPU crash with anisotropic shader in group node.

Problem was that due to group proxy node the anisotropic node did not detect
early enough that it needs generated texture coordinate data to generate the
tangent. Now the proxy nodes are removed earlier.

7 years agoOptimize BKE_mesh_calc_normals(), gives approx 25% speedup.
Campbell Barton [Fri, 10 May 2013 10:07:01 +0000 (10:07 +0000)]
Optimize BKE_mesh_calc_normals(), gives approx 25% speedup.
- no need to allocate polygon normal array.
- no need to use BLI_array_ functions (realloc's).
- reduce some of the looping.

7 years agoSmall fix for node add operators: use the UNDO option so they get registered in undo...
Lukas Toenne [Fri, 10 May 2013 09:54:25 +0000 (09:54 +0000)]
Small fix for node add operators: use the UNDO option so they get registered in undo stack properly.

7 years agoFix for #35286, 'Reset to Default Theme' makes some node titlebars go black. These...
Lukas Toenne [Fri, 10 May 2013 08:08:29 +0000 (08:08 +0000)]
Fix for #35286, 'Reset to Default Theme' makes some node titlebars go black. These node theme colors were set in init_userdef_do_versions, but missing in ui_theme_init_default. Also adjusted the group input/output colors there to match the colors set in do_versions.

7 years agoavoid using BLI_array_* macros for uv reset.
Campbell Barton [Fri, 10 May 2013 08:08:18 +0000 (08:08 +0000)]
avoid using BLI_array_* macros for uv reset.

7 years agoLeft extra logging print by accident.
Sergey Sharybin [Fri, 10 May 2013 07:26:55 +0000 (07:26 +0000)]
Left extra logging print by accident.

7 years agoBGE: Fix for [#35204] "New Alpha-Enabled Shadows Work Until UVs Change" reported...
Mitchell Stokes [Fri, 10 May 2013 07:05:12 +0000 (07:05 +0000)]
BGE: Fix for [#35204] "New Alpha-Enabled Shadows Work Until UVs Change" reported by Josiah Lane (solarlune).

BL_BlenderShader was only sending over proper UV data if the current drawing mode was KX_TEXTURED. Now it also checks for (and sends data for) alpha shadows.

7 years agoRemove check for zero focal length in BA cost functor
Sergey Sharybin [Fri, 10 May 2013 06:48:47 +0000 (06:48 +0000)]
Remove check for zero focal length in BA cost functor

This check is actually redundant, because empty intrinsics
will have focal length of 1.0, which means original comment
about BundleIntrinsics was not truth.

It is possible that external user will send focal length of
zero to be refined, but blender prevents this from happening.

7 years agoavoid customdata lookups for selection test/enable disable.
Campbell Barton [Fri, 10 May 2013 06:46:32 +0000 (06:46 +0000)]
avoid customdata lookups for selection test/enable disable.
also add uvedit_face_select_set, uvedit_edge_select_set, uvedit_uv_select_set - since quite a few areas where setting based on a boolean.

7 years agoSynchronize changes between bunded libmv and own libmv branch.
Sergey Sharybin [Fri, 10 May 2013 06:26:01 +0000 (06:26 +0000)]
Synchronize changes between bunded libmv and own libmv branch.

7 years agoBGE: Fix for [#34382] "Vertex position doesn't update when set through Python and...
Mitchell Stokes [Fri, 10 May 2013 05:13:16 +0000 (05:13 +0000)]
BGE: Fix for [#34382] "Vertex position doesn't update when set through Python and "Cast Buffer Shadows" is disabled" reported by V.R. (rolle).

The BucketManager was assuming that all modified meshes were rendered when a render pass completed. However, materials that did not cast buffer shadows did not render during the shadow rendering step, and thus were never updated.

7 years agoBit flag enum props are always expanded, no need to specify it explicitely!
Bastien Montagne [Thu, 9 May 2013 19:30:09 +0000 (19:30 +0000)]
Bit flag enum props are always expanded, no need to specify it explicitely!

7 years agoAdd check for points behind camera in euclidan BA cost functor
Sergey Sharybin [Thu, 9 May 2013 16:38:58 +0000 (16:38 +0000)]
Add check for points behind camera in euclidan BA cost functor

In cases keyframes are no so good, algebraic two frames construction
could produce result, for which more aggressive Ceres-based BA code
will fall to a solution for which points goes behind the camera,
which is not so nice.

Seems in newer Ceres returning false from cost functor wouldn't
abort solution, but will restrict solver from moving points behind
the camera.

Works fine in own tests, but requires more tests.

7 years agoAdded a button to apply scale on scene solution
Sergey Sharybin [Thu, 9 May 2013 16:38:55 +0000 (16:38 +0000)]
Added a button to apply scale on scene solution

This is an alternative to using camera to scale the
scene and it's expected to be better solution because
scaling camera leads to issues with z-buffer.

Found the whole scaling thing a bit confusing,
especially for object tracking, but cleaning this up
is a bit different topic.

7 years agoSetting tracking object scale shall not depend on active object
Sergey Sharybin [Thu, 9 May 2013 16:38:50 +0000 (16:38 +0000)]
Setting tracking object scale shall not depend on active object

7 years agoMade bundles in 3D viewport have constant size
Sergey Sharybin [Thu, 9 May 2013 16:38:47 +0000 (16:38 +0000)]
Made bundles in 3D viewport have constant size

This means bundles' size is not affected by camera scale.
This way it's more useful to work with -- bundles never
becomes too small or too large (depending on reconstructed
scene scale).

7 years agoReconstructed scene scale ambiguity improvement
Sergey Sharybin [Thu, 9 May 2013 16:38:43 +0000 (16:38 +0000)]
Reconstructed scene scale ambiguity improvement

Made it so reconstructed scene always scaled in a way
that variance of camera centers is unity.

This solves "issues" when different keyframes will
give the same reprojection error but will give scenes
with different.scale, which could easily have been
considered as a bad keyframe combination.

This change is essential for automatic keyframe
selection algorithm to work reliable for user.

7 years agoCycles / OpenCL:
Thomas Dinges [Thu, 9 May 2013 16:16:41 +0000 (16:16 +0000)]
Cycles / OpenCL:
* Remove old comment for sm_13 cards and really check for OpenCL 1.1.

7 years agoCycles OpenCL: fix other build issues when enabling more features.
Brecht Van Lommel [Thu, 9 May 2013 15:28:38 +0000 (15:28 +0000)]
Cycles OpenCL: fix other build issues when enabling more features.

7 years agoCycles:
Thomas Dinges [Thu, 9 May 2013 15:20:00 +0000 (15:20 +0000)]
* Change some if / else if conditions to switch / case.

7 years agoShow dash instead of filename when displaying frame above image sequence length.
Sergey Sharybin [Thu, 9 May 2013 15:04:32 +0000 (15:04 +0000)]
Show dash instead of filename when displaying frame above image sequence length.

7 years agoChanges to footage information panel
Sergey Sharybin [Thu, 9 May 2013 14:57:20 +0000 (14:57 +0000)]
Changes to footage information panel

- Display additional information about channels
  and buffer type (float/byte).
- Don't show frame number beyong sequence length.
- Also fixed issues with footage length calculation,
  so it's pronbably will be needed to reload some
  of existing footages.

7 years agoCycles / Filter functions:
Thomas Dinges [Thu, 9 May 2013 14:37:32 +0000 (14:37 +0000)]
Cycles / Filter functions:
* Avoid some variable castings here to save some calculations.

7 years agoCycles:
Thomas Dinges [Thu, 9 May 2013 14:21:36 +0000 (14:21 +0000)]
* Remove unused film_response table code.

7 years agoCycles / OSL:
Thomas Dinges [Thu, 9 May 2013 14:13:43 +0000 (14:13 +0000)]
Cycles / OSL:
* Remove custom template from r52885, not needed anymore as OSL 1.3 is a requirement and we do not use a custom branch anymore.

7 years agoCycles OpenCL: a few fixes to get things compiling after kernel changes,
Brecht Van Lommel [Thu, 9 May 2013 14:05:40 +0000 (14:05 +0000)]
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.

7 years agoCycles bump node: change the Strength value to work better, previously it would
Brecht Van Lommel [Thu, 9 May 2013 14:05:37 +0000 (14:05 +0000)]
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.

7 years agofix [#35280] blender crashes when setting Environment Map imagefile
Campbell Barton [Thu, 9 May 2013 14:01:42 +0000 (14:01 +0000)]
fix [#35280] blender crashes when setting Environment Map imagefile

7 years agouse standard name for operator properties - 'props'.
Campbell Barton [Thu, 9 May 2013 13:05:36 +0000 (13:05 +0000)]
use standard name for operator properties - 'props'.

7 years agobmesh: optimize bmesh_vert_separate, redice allocs (best cast it wont do any allocs).
Campbell Barton [Thu, 9 May 2013 12:46:35 +0000 (12:46 +0000)]
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.

7 years agoUpgrade for the add_search node operator. This now uses the same basic system as...
Lukas Toenne [Thu, 9 May 2013 11:43:48 +0000 (11:43 +0000)]
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.

7 years agocan't use alloca in inline functions (fills up stack - I thought compiler would be...
Campbell Barton [Thu, 9 May 2013 11:42:24 +0000 (11:42 +0000)]
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.

7 years agobmesh: avoid using BLI_array macros for every face when converting to bmesh, replace...
Campbell Barton [Thu, 9 May 2013 10:44:38 +0000 (10:44 +0000)]
bmesh: avoid using BLI_array macros for every face when converting to bmesh, replace with alloca

7 years agobmesh speedup: skip free-realloc while running CustomData_bmesh_merge() when nothing...
Campbell Barton [Thu, 9 May 2013 10:41:05 +0000 (10:41 +0000)]
bmesh speedup: skip free-realloc while running CustomData_bmesh_merge() when nothing is changed (happens quite often that there is nothing to do).

7 years agoFix for add_node operator: needs to have SKIP_SAVE set for the settings collection...
Lukas Toenne [Thu, 9 May 2013 10:13:13 +0000 (10:13 +0000)]
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).

7 years agoPartial revert of own commits r56604 and r56603:
Thomas Dinges [Thu, 9 May 2013 10:03:38 +0000 (10:03 +0000)]
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.

7 years agoFix for do_versions bug with node groups: The special case of direct input-to-output...
Lukas Toenne [Thu, 9 May 2013 08:29:59 +0000 (08:29 +0000)]
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.

7 years agoFix suggested by Campbell Barton: use %r instead of %s when building the python expre...
Lukas Toenne [Thu, 9 May 2013 08:05:02 +0000 (08:05 +0000)]
Fix suggested by Campbell Barton: use %r instead of %s when building the python expression for the node operator settings to ensure correct escaping.

7 years agofix for 2 errors introduced since release
Campbell Barton [Thu, 9 May 2013 07:02:51 +0000 (07:02 +0000)]
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.

7 years agofix rna_info, python method to C function wasn't being tested for. (broke changelog...
Campbell Barton [Thu, 9 May 2013 02:50:59 +0000 (02:50 +0000)]
fix rna_info, python method to C function wasn't being tested for. (broke changelog generator)

7 years agoupdate autogenerated changelog. also correct typos in the generator.
Campbell Barton [Thu, 9 May 2013 01:58:49 +0000 (01:58 +0000)]
update autogenerated changelog. also correct typos in the generator.

7 years agofix [#35257] Brige > Merge sometimes flips result
Campbell Barton [Wed, 8 May 2013 23:14:27 +0000 (23:14 +0000)]
fix [#35257] Brige > Merge sometimes flips result

7 years agobugfix: [#31757] setGLSLMaterialSetting has no effect
Dalai Felinto [Wed, 8 May 2013 21:43:35 +0000 (21:43 +0000)]
bugfix: [#31757] setGLSLMaterialSetting has no effect
original patch by me, with contribution from HG1 and Florian Völker

bug introduced in rev. 40113

7 years agoUI naming consistency:
Thomas Dinges [Wed, 8 May 2013 21:41:47 +0000 (21:41 +0000)]
UI naming consistency:
* ShapeKey -> Shape Key. Was called "Shape Key" in most places already.

Pointed out by Dalai, thanks!

7 years agoUI naming consistency:
Thomas Dinges [Wed, 8 May 2013 21:05:52 +0000 (21:05 +0000)]
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.

7 years agoCycles / Tile Rendering:
Thomas Dinges [Wed, 8 May 2013 19:49:09 +0000 (19:49 +0000)]
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.

7 years agoAttempt to fix OS X build with 10.6 SDK, was not working due to recent fullscreen...
Brecht Van Lommel [Wed, 8 May 2013 19:37:36 +0000 (19:37 +0000)]
Attempt to fix OS X build with 10.6 SDK, was not working due to recent fullscreen bug fixes.

7 years agoCycles / Hair rendering:
Thomas Dinges [Wed, 8 May 2013 17:33:25 +0000 (17:33 +0000)]
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.

7 years agoBlender 2.68 release cycle begin:
Thomas Dinges [Wed, 8 May 2013 17:23:56 +0000 (17:23 +0000)]
Blender 2.68 release cycle begin:
* BCon1, Alpha. Let's have an awesome one!

7 years agoUpdated the template script to reflect socket draw API changes in...
Lukas Toenne [Wed, 8 May 2013 16:17:04 +0000 (16:17 +0000)]
Updated the template script to reflect socket draw API changes in r56584 and r56585.

7 years agoFix for node group user count: since node group pointer uses an explicit setter callb...
Lukas Toenne [Wed, 8 May 2013 16:00:08 +0000 (16:00 +0000)]
Fix for node group user count: since node group pointer uses an explicit setter callback it has to do user count increment/decrement manually.

7 years agoFix for node item polling: recursion check was the wrong way around, needs to test...
Lukas Toenne [Wed, 8 May 2013 15:41:09 +0000 (15:41 +0000)]
Fix for node item polling: recursion check was the wrong way around, needs to test is the parent tree is inside the group.

7 years agoAdded filter to the node group items callback to remove recursive node groups right...
Lukas Toenne [Wed, 8 May 2013 15:41:07 +0000 (15:41 +0000)]
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.

7 years agoA bit more pythonic way of using the items callback in node categories. The category...
Lukas Toenne [Wed, 8 May 2013 15:41:05 +0000 (15:41 +0000)]
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.

7 years ago2 fixes for node group node_tree pointer property: Make sure the nodeGroupPoll functi...
Lukas Toenne [Wed, 8 May 2013 15:41:01 +0000 (15:41 +0000)]
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.

7 years agoExpose the data type property of node group interfaces for easier comparison in python.
Lukas Toenne [Wed, 8 May 2013 15:40:58 +0000 (15:40 +0000)]
Expose the data type property of node group interfaces for easier comparison in python.

7 years agoMoved a couple of common properties into the NodeAddOperator base class to avoid...
Lukas Toenne [Wed, 8 May 2013 15:40:53 +0000 (15:40 +0000)]
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).

7 years agoRemoved the unused socket template system from the bpy_types Node base class (it...
Lukas Toenne [Wed, 8 May 2013 15:40:51 +0000 (15:40 +0000)]
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.

7 years agoExposed the node socket templates of C nodes in RNA by means of a classmethod. This...
Lukas Toenne [Wed, 8 May 2013 15:40:49 +0000 (15:40 +0000)]
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.

7 years agoRemoved the add_group_node operator, this is now integrated into the generic node_add...
Lukas Toenne [Wed, 8 May 2013 15:40:46 +0000 (15:40 +0000)]
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.

7 years agoExpose the HIDE_VALUE flag of node sockets in RNA.
Lukas Toenne [Wed, 8 May 2013 15:40:44 +0000 (15:40 +0000)]
Expose the HIDE_VALUE flag of node sockets in RNA.

7 years agoWorkaround for C nodes: In order to make registerable RNA methods of the standard...
Lukas Toenne [Wed, 8 May 2013 15:40:40 +0000 (15:40 +0000)]
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.

7 years agoExtended the draw callback API for node sockets with an explicit text parameter,...
Lukas Toenne [Wed, 8 May 2013 14:58:41 +0000 (14:58 +0000)]
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.

7 years agoChange to socket draw functions: instead of always only drawing the socket label...
Lukas Toenne [Wed, 8 May 2013 14:58:37 +0000 (14:58 +0000)]
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.

7 years agomore optimal method of calculating the normal for the solidify modifier.
Campbell Barton [Wed, 8 May 2013 14:33:02 +0000 (14:33 +0000)]
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.

7 years agoMask modifier for sequences
Sergey Sharybin [Wed, 8 May 2013 14:20:57 +0000 (14:20 +0000)]
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.

7 years agoFix for #35253, Cannot animate X, Y, Z values in nodes with vector sub-menu. The...
Lukas Toenne [Wed, 8 May 2013 14:18:09 +0000 (14:18 +0000)]
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.

7 years agocode cleanup: dissolve - use iterator macros, remove unused function.
Campbell Barton [Wed, 8 May 2013 14:08:37 +0000 (14:08 +0000)]
code cleanup: dissolve - use iterator macros, remove unused function.

7 years agomesh dissolve vertices: option to split off corners of surrounding faces, makes the...
Campbell Barton [Wed, 8 May 2013 14:01:38 +0000 (14:01 +0000)]
mesh dissolve vertices: option to split off corners of surrounding faces, makes the result more localized to the area around the vertex.

7 years agosplit dissolve into 3 different operators (face/edge/vert).
Campbell Barton [Wed, 8 May 2013 13:48:57 +0000 (13:48 +0000)]
split dissolve into 3 different operators (face/edge/vert).

7 years agoFix #35219: blender internal auto ray bias to avoid the terminator shadow
Brecht Van Lommel [Wed, 8 May 2013 13:23:20 +0000 (13:23 +0000)]
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.

7 years agoFix #35240: command line -t number of threads option did not work for cycles.
Brecht Van Lommel [Wed, 8 May 2013 13:23:17 +0000 (13:23 +0000)]
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.

7 years agoFix #35246: cycles has no simple way to combine bump and normal mapping. Now
Brecht Van Lommel [Wed, 8 May 2013 13:23:13 +0000 (13:23 +0000)]
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.

7 years agofix for recent commit, WITH_GUARDEDALLOC wasn't enabled for makesrna, makesdna.
Campbell Barton [Wed, 8 May 2013 13:19:55 +0000 (13:19 +0000)]
fix for recent commit, WITH_GUARDEDALLOC wasn't enabled for makesrna, makesdna.

7 years agoFix #35093: New Basis shape key doesn't act as Basis
Sergey Sharybin [Wed, 8 May 2013 13:16:45 +0000 (13:16 +0000)]
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.