blender.git
3 years agoCleanup: unused vars, imports, pep8
Campbell Barton [Mon, 1 Aug 2016 01:54:02 +0000 (11:54 +1000)]
Cleanup: unused vars, imports, pep8

3 years agoReplace pep8 with flake8 checker
Campbell Barton [Mon, 1 Aug 2016 01:02:01 +0000 (11:02 +1000)]
Replace pep8 with flake8 checker

3 years agoSupport Auto-Clamped Handle for Curve-Mapping
Campbell Barton [Sun, 31 Jul 2016 23:01:43 +0000 (09:01 +1000)]
Support Auto-Clamped Handle for Curve-Mapping

This patch supports auto-clamped handles for curves,
useful since without this it can be difficult to have 'flat' sections of a curve.

3 years agoFix T48980: crash when loading a file that contains a custom node tree.
Bastien Montagne [Sun, 31 Jul 2016 18:07:33 +0000 (20:07 +0200)]
Fix T48980: crash when loading a file that contains a custom node tree.

Syupid logical mistake in own recent rB018d336cbd51...

3 years agoCorrection to 0f2ff52c0866
Julian Eisel [Sun, 31 Jul 2016 16:35:38 +0000 (18:35 +0200)]
Correction to 0f2ff52c0866

This info is shown while dragging, so should stay where it was.

3 years agoEnable Undo for "Add background Image"
Julian Eisel [Sun, 31 Jul 2016 15:33:57 +0000 (17:33 +0200)]
Enable Undo for "Add background Image"

Enabled the Undo option for the operation "Add background Image". This is to treat adding a background image like opening an image. This behavior is useful when a background image is add using 'drag and drop'.

Reviewers: Severin

Reviewed By: Severin

Subscribers: brecht

Tags: #bf_blender

Maniphest Tasks: T47050

Differential Revision: https://developer.blender.org/D1725

3 years agoFix mistake in Cycles mix node multiply constant folding.
Brecht Van Lommel [Sun, 31 Jul 2016 12:56:49 +0000 (14:56 +0200)]
Fix mistake in Cycles mix node multiply constant folding.

3 years agoCleanup: reduce Vector_getseters size using macros
Campbell Barton [Sun, 31 Jul 2016 10:41:24 +0000 (20:41 +1000)]
Cleanup: reduce Vector_getseters size using macros

3 years agoCorrect own error in last commit
Campbell Barton [Sun, 31 Jul 2016 09:12:40 +0000 (19:12 +1000)]
Correct own error in last commit

3 years agoSupport limiting collisions by group for softbody and particles
Alexander Gavrilov [Sun, 31 Jul 2016 08:56:44 +0000 (18:56 +1000)]
Support limiting collisions by group for softbody and particles

This feature is extremely useful for layering multiple cloth objects,
and there is no reason there shouldn't be the same kind of feature for softbody.

3 years agoCleanup: spelling, style
Campbell Barton [Sun, 31 Jul 2016 07:41:05 +0000 (17:41 +1000)]
Cleanup: spelling, style

3 years agoPyAPI: minor optimization for dictionary creation
Campbell Barton [Sun, 31 Jul 2016 07:22:04 +0000 (17:22 +1000)]
PyAPI: minor optimization for dictionary creation

Pass size when its known.

3 years agoPyAPI: fix leak in unlikely case converting idprops fail
Campbell Barton [Sun, 31 Jul 2016 06:59:08 +0000 (16:59 +1000)]
PyAPI: fix leak in unlikely case converting idprops fail

3 years agoPyAPI: Add PyC_UnicodeAsByteAndSize
Campbell Barton [Sun, 31 Jul 2016 06:52:44 +0000 (16:52 +1000)]
PyAPI: Add PyC_UnicodeAsByteAndSize

Read the string length from Python directly when assigning id-properties

3 years agoDocs: add initial idprop.types API docs
Campbell Barton [Sun, 31 Jul 2016 05:39:30 +0000 (15:39 +1000)]
Docs: add initial idprop.types API docs

3 years agoDocs: simplify EXCLUDE_MODULES handling
Campbell Barton [Sun, 31 Jul 2016 04:37:25 +0000 (14:37 +1000)]
Docs: simplify EXCLUDE_MODULES handling

3 years agoCleanup: capitalize Blender & Python
Campbell Barton [Sun, 31 Jul 2016 04:31:39 +0000 (14:31 +1000)]
Cleanup: capitalize Blender & Python

3 years agosimplify redundant conditionals
Mike Erwin [Sun, 31 Jul 2016 05:22:36 +0000 (01:22 -0400)]
simplify redundant conditionals

The redundant terms were harmless but check an expression we already
know to be true (from earlier in the same conditional).

Found by PVS-Studio T48917

3 years agoImprove description for use_self py-driver option
Campbell Barton [Sun, 31 Jul 2016 04:21:16 +0000 (14:21 +1000)]
Improve description for use_self py-driver option

3 years agoCurve Fitting: circular fit could give NAN handles
Campbell Barton [Sun, 31 Jul 2016 03:55:50 +0000 (13:55 +1000)]
Curve Fitting: circular fit could give NAN handles

Fitting lines that exactly double back on themselves could give NAN length handles.

3 years agoCleanup: rename btree (incorrect & confusing)
Campbell Barton [Sun, 31 Jul 2016 02:02:33 +0000 (12:02 +1000)]
Cleanup: rename btree (incorrect & confusing)

3 years agoFix Cycles OpenCL compile error on Windows.
Brecht Van Lommel [Sat, 30 Jul 2016 23:54:05 +0000 (01:54 +0200)]
Fix Cycles OpenCL compile error on Windows.

3 years agoPy-Driver: re-use self PyObject when its unchanged.
Campbell Barton [Sun, 31 Jul 2016 01:43:24 +0000 (11:43 +1000)]
Py-Driver: re-use self PyObject when its unchanged.

3 years agoPy-Driver: use intern strings
Campbell Barton [Sun, 31 Jul 2016 01:22:02 +0000 (11:22 +1000)]
Py-Driver: use intern strings

Avoids managing strings inline

3 years agoFix for previous commit changing the addons submodule.
Brecht Van Lommel [Sun, 31 Jul 2016 01:23:51 +0000 (03:23 +0200)]
Fix for previous commit changing the addons submodule.

3 years agoCycles: refactor kernel closure storage to use structs per closure type.
Brecht Van Lommel [Mon, 25 Jul 2016 01:03:23 +0000 (03:03 +0200)]
Cycles: refactor kernel closure storage to use structs per closure type.

Reviewed By: dingto, sergey

Differential Revision: https://developer.blender.org/D2127

3 years agoCycles: constant fold add/mul type nodes with known 0 and 1 arguments.
Alexander Gavrilov [Sat, 30 Jul 2016 18:03:49 +0000 (20:03 +0200)]
Cycles: constant fold add/mul type nodes with known 0 and 1 arguments.

These values often either turn the node into a no-op, or even make it
evaluate to 0 no matter what the other input value is, thus allowing
deletion of a branch of the node graph that otherwise is not constant.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2085

3 years agoCycles: constant folding for RGB/Vector Curves and Color Ramp.
Alexander Gavrilov [Sat, 30 Jul 2016 21:30:36 +0000 (23:30 +0200)]
Cycles: constant folding for RGB/Vector Curves and Color Ramp.

These are complex nodes, and it's conceivable they may end up constant
in some circumstances within node groups, so folding support is useful.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2084

3 years agoFix Cycles OpenCL not always allocating enough space for closures.
Brecht Van Lommel [Sat, 30 Jul 2016 17:16:29 +0000 (19:16 +0200)]
Fix Cycles OpenCL not always allocating enough space for closures.

3 years agoFix CUDA warning, due to extra ; at the line ending.
Thomas Dinges [Sat, 30 Jul 2016 19:37:20 +0000 (21:37 +0200)]
Fix CUDA warning, due to extra ; at the line ending.

3 years agoCycles OpenCL: use #line directives for better error messages.
Brecht Van Lommel [Sat, 30 Jul 2016 14:54:48 +0000 (16:54 +0200)]
Cycles OpenCL: use #line directives for better error messages.

3 years agoCycles OpenCL: detect incorrect usage of SOA members in the split kernel.
Brecht Van Lommel [Sat, 30 Jul 2016 13:18:21 +0000 (15:18 +0200)]
Cycles OpenCL: detect incorrect usage of SOA members in the split kernel.

3 years agoFix Cycles OpenCL address space compile error with amdgpu-pro drivers on Linux.
Brecht Van Lommel [Sat, 30 Jul 2016 13:17:30 +0000 (15:17 +0200)]
Fix Cycles OpenCL address space compile error with amdgpu-pro drivers on Linux.

3 years agoCleanup: pep8
Campbell Barton [Sat, 30 Jul 2016 08:39:22 +0000 (18:39 +1000)]
Cleanup: pep8

3 years agoFix bplayer (c)
Thomas Beck [Sat, 30 Jul 2016 08:35:30 +0000 (10:35 +0200)]
Fix bplayer (c)

3 years agoCleanup: pep8
Campbell Barton [Sat, 30 Jul 2016 08:15:16 +0000 (18:15 +1000)]
Cleanup: pep8

3 years agoCleanup: minor changes from last commit
Campbell Barton [Sat, 30 Jul 2016 06:47:18 +0000 (16:47 +1000)]
Cleanup: minor changes from last commit

Un-indent blocks, rename vars.

3 years agoPy-Driver: add 'self' option
Campbell Barton [Sat, 30 Jul 2016 06:34:01 +0000 (16:34 +1000)]
Py-Driver: add 'self' option

Drivers can use this to refer to the data which the driver is applied to,
useful for objects, bones, to avoid having to create a variable pointing to its self.

3 years agoCloth Simulation: add time scale property
Campbell Barton [Sat, 30 Jul 2016 04:46:19 +0000 (14:46 +1000)]
Cloth Simulation: add time scale property

This setting can also be animated, to create a "time warp" effect.

D2122 by @LucaRood

3 years agoCloth: option to use dynamic base mesh
Campbell Barton [Sat, 30 Jul 2016 04:47:31 +0000 (14:47 +1000)]
Cloth: option to use dynamic base mesh

This adds the ability for cloth simulations to respect changes in the underlying mesh.
So you can for instance, animate shape keys, armatures, or add any deformation modifiers (above the cloth modifier).

This is mainly useful for (but not limited to) cartoon animations,
where your character might stretch or change shape, and you want the clothes to follow accordingly.

D1903 by @LucaRood

3 years agoCloth: UI cleanup & quality hard limit removal
Campbell Barton [Sat, 30 Jul 2016 04:44:28 +0000 (14:44 +1000)]
Cloth: UI cleanup & quality hard limit removal

D2121 by @LucaRood

3 years agoCleanup: pep8
Campbell Barton [Fri, 29 Jul 2016 11:22:27 +0000 (21:22 +1000)]
Cleanup: pep8

3 years agoAdd copy/make_local to movieclip datablock.
Bastien Montagne [Fri, 29 Jul 2016 21:13:31 +0000 (23:13 +0200)]
Add copy/make_local to movieclip datablock.

As title says... Copying tracking data from movieclip was not the simplest thing...

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2126

3 years agoGtests: Re-apply strict compiler fixes
Sergey Sharybin [Fri, 29 Jul 2016 16:59:54 +0000 (18:59 +0200)]
Gtests: Re-apply strict compiler fixes

3 years agoCycles: Add fundamentals to test constant folding
Sergey Sharybin [Fri, 29 Jul 2016 16:44:29 +0000 (18:44 +0200)]
Cycles: Add fundamentals to test constant folding

This commit adds some easy to use way to check whether the graph
was properly optimized. The idea is based on using mock glog sync
which keeps track on all messages and expects specific log message
to appear in the logging.

This means each optimization step should report that it optimized
something (specifying what exactly was optimized) and what was used
for optimization.

There's also some ease-ish way to define shader networks which we
might want to make a bit more global and available for all tests
in the future.

For now only RGBToBW node is covered as an example, really hope
to get help from active guys in the community to finish covering
all existing optimization cases. Ready to fix any possible issues
with builder when needed tho :)

3 years agoAdd GMock library which is responsive for dealing with mock objects
Sergey Sharybin [Fri, 29 Jul 2016 16:34:33 +0000 (18:34 +0200)]
Add GMock library which is responsive for dealing with mock objects

3 years agoGTests: Update to a newer Git version
Sergey Sharybin [Fri, 29 Jul 2016 16:33:27 +0000 (18:33 +0200)]
GTests: Update to a newer Git version

Required to get GMock working with GTest.

3 years agoFix missing redraw of timeline when changing GPencil layer settings
Julian Eisel [Fri, 29 Jul 2016 18:42:57 +0000 (20:42 +0200)]
Fix missing redraw of timeline when changing GPencil layer settings

3 years agoCleanup space/tabs, Grrr.
Bastien Montagne [Fri, 29 Jul 2016 16:49:50 +0000 (18:49 +0200)]
Cleanup space/tabs, Grrr.

3 years agoFix a bunch of missing expand calls in object/particle physics area, was breaking...
Bastien Montagne [Fri, 29 Jul 2016 15:35:31 +0000 (17:35 +0200)]
Fix a bunch of missing expand calls in object/particle physics area, was breaking linking of those.

Initial report/patch by Alexander Gavrilov (@angavrilov), found more on the road.

Nice demo of why we should use libquery ID looper in read code too - but that's for another day
(also because read code needs to take care of some deprecated pointers sometimes)...

3 years agoCycles: Fix wrong projection coordinates for points behind the camera
Sergey Sharybin [Fri, 29 Jul 2016 15:28:36 +0000 (17:28 +0200)]
Cycles: Fix wrong projection coordinates for points behind the camera

Points behind camera will be flipped on projection, but that did not
happen.

This solves second issue reported at T48848.

3 years agoCycles: Fix wrong check for object is behind camera after recent fixes
Sergey Sharybin [Fri, 29 Jul 2016 14:37:02 +0000 (16:37 +0200)]
Cycles: Fix wrong check for object is behind camera after recent fixes

3 years agoFix T48971: Append creates linked image textures if object has shape keys.
Bastien Montagne [Fri, 29 Jul 2016 15:00:29 +0000 (17:00 +0200)]
Fix T48971: Append creates linked image textures if object has shape keys.

Hating all those not-so-real ID types... Here there were two causes for the issue:
1) Linked shapekey ID was made local twice (once from mesh's make local, once by itself).
   Solved by not explicitely making shapekeys (nor any other non-linkable datatype) local.
2) Key->from 'back pointer' to its owner was messing 'still in used' detection of linked data
   after localization. Fixed with a hack for now, thinking correct solution might actually
   be to not consider this pointer at all in libquery ID looper, since it's nothing like
   and actual usage of mesh/lattice/curve.

Again, shapekeys as ID is a joke, those should be mere struct, they have absolutely nothing to do in Main, period. :(

Point 2) still demonstrates the need for better handling of IDs dependencies though,
so far we only hit corner cases, but think there could also be valid cases generating those
'dependency cycles' between IDs (ID a using ID b which uses ID a), this will have to be addressed some day...

3 years agoRemove "debug build only" event printing.
Bastien Montagne [Fri, 29 Jul 2016 12:45:15 +0000 (14:45 +0200)]
Remove "debug build only" event printing.

This makes no sense since user usually only has release build... And those noisy printings are
behind debug flag anyway, so really no reason to only print them out in debug build.

3 years agoCycles: Fix strict compilation warning
Sergey Sharybin [Fri, 29 Jul 2016 13:06:13 +0000 (15:06 +0200)]
Cycles: Fix strict compilation warning

3 years agoFix T48679: Bone transform only alters between translation and rotation
Sergey Sharybin [Fri, 29 Jul 2016 12:45:27 +0000 (14:45 +0200)]
Fix T48679: Bone transform only alters between translation and rotation

There was some smart code in the transform which would alter between translation
and rotation based on whether bone is connected or not and whether translation is
locked or not.

It could be handy to also fallback to scale if both rotation and translation are
locked.

3 years agoCycles: remove narrowing conversion from recent commit
Mai Lavelle [Fri, 29 Jul 2016 08:00:37 +0000 (04:00 -0400)]
Cycles: remove narrowing conversion from recent commit

3 years agoCycles microdisplacement: move subdivision options to subsurf modifier
Mai Lavelle [Sat, 16 Jul 2016 23:56:45 +0000 (19:56 -0400)]
Cycles microdisplacement: move subdivision options to subsurf modifier

Subdivision options can now be found in the subsurf modifier. The modifier must
be the last in the stack or the options will be unavailable. Catmull-Clark
subdivision is still unavailable and will fallback to linear subdivision instead

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2109

3 years agoCycles microdisplacement: ngons and attributes for subdivision meshes
Mai Lavelle [Sat, 16 Jul 2016 23:42:28 +0000 (19:42 -0400)]
Cycles microdisplacement: ngons and attributes for subdivision meshes

This adds support for ngons and attributes on subdivision meshes. Ngons are
needed for proper attribute interpolation as well as correct Catmull-Clark
subdivision. Several changes are made to achieve this:

- new primitive `SubdFace` added to `Mesh`
- 3 more textures are used to store info on patches from subd meshes
- Blender export uses loop interface instead of tessface for subd meshes
- `Attribute` class is updated with a simplified way to pass primitive counts
  around and to support ngons.
- extra points for ngons are generated for O(1) attribute interpolation
- curves are temporally disabled on subd meshes to avoid various bugs with
  implementation
- old unneeded code is removed from `subd/`
- various fixes and improvements

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2108

3 years agoMissing free for single-sided edge-slide failure
Campbell Barton [Thu, 28 Jul 2016 23:50:55 +0000 (09:50 +1000)]
Missing free for single-sided edge-slide failure

3 years agoFix Cycles OSL hair BSDF inconsistencies with SVM.
Brecht Van Lommel [Fri, 29 Jul 2016 00:22:01 +0000 (02:22 +0200)]
Fix Cycles OSL hair BSDF inconsistencies with SVM.

3 years agoFix Cycles ctests not always deleting fail.png files on success.
Brecht Van Lommel [Fri, 29 Jul 2016 00:04:45 +0000 (02:04 +0200)]
Fix Cycles ctests not always deleting fail.png files on success.

3 years agoFix use of uninitialized variable in Cycles, mostly harmless.
Brecht Van Lommel [Thu, 28 Jul 2016 23:04:01 +0000 (01:04 +0200)]
Fix use of uninitialized variable in Cycles, mostly harmless.

3 years agoMake ID types typed enum, to easily spot missing ones in core switches of library.c
Bastien Montagne [Thu, 28 Jul 2016 13:21:53 +0000 (15:21 +0200)]
Make ID types typed enum, to easily spot missing ones in core switches of library.c

Note that all deprecated/non-real ID types are kept as defines.

3 years agoFix T48965: Cannot Append Palette As Local Datablock.
Bastien Montagne [Thu, 28 Jul 2016 12:40:26 +0000 (14:40 +0200)]
Fix T48965: Cannot Append Palette As Local Datablock.

Palette and PaintCurve were totally missing from id_copy/id_make_local switch... :/

3 years agoCycles: Fix difference in Ashikhmin Shirley shader between CPU and GPU
Sergey Sharybin [Thu, 28 Jul 2016 16:46:29 +0000 (18:46 +0200)]
Cycles: Fix difference in Ashikhmin Shirley shader between CPU and GPU

The issue was caused by some NaN appearing in calculations.

Visible with scifi_armor_concept.blend from the cloud.

3 years agoCleanup: Indentation
Sergey Sharybin [Thu, 28 Jul 2016 12:17:35 +0000 (14:17 +0200)]
Cleanup: Indentation

3 years agoFix T48838: Tiling sculpt problem with custom brush
Sergey Sharybin [Thu, 28 Jul 2016 12:00:44 +0000 (14:00 +0200)]
Fix T48838: Tiling sculpt problem with custom brush

3 years agoFix T48962: Edge-slide, random edge switch order
Campbell Barton [Thu, 28 Jul 2016 11:48:07 +0000 (21:48 +1000)]
Fix T48962: Edge-slide, random edge switch order

3 years agoCycles: Fix missing mesh flags update when tweaking shaders
Sergey Sharybin [Thu, 28 Jul 2016 10:37:44 +0000 (12:37 +0200)]
Cycles: Fix missing mesh flags update when tweaking shaders

This is a bit weak, but better than tagging whole mesh manager for update.

Maybe we'll solve such dual-look up in the future.

This commit finally solves T48963: Noise when changing Diffuse node to Emission node

3 years agoCycles: Fix wrong order of light manager update tag
Sergey Sharybin [Thu, 28 Jul 2016 10:31:01 +0000 (12:31 +0200)]
Cycles: Fix wrong order of light manager update tag

Shader's has_surface_emission will only be known for sure after compilation.

3 years agoCycles: De-duplicate more checks around light emisive meshes
Sergey Sharybin [Thu, 28 Jul 2016 10:27:24 +0000 (12:27 +0200)]
Cycles: De-duplicate more checks around light emisive meshes

Once again, should be no functional changes.

3 years agoCycles: De-duplicate check for MIS shaders in meshes
Sergey Sharybin [Thu, 28 Jul 2016 10:20:47 +0000 (12:20 +0200)]
Cycles: De-duplicate check for MIS shaders in meshes

Should be no functional changes.

3 years agoCycles: Add some extra logging for light debugging
Sergey Sharybin [Thu, 28 Jul 2016 10:13:11 +0000 (12:13 +0200)]
Cycles: Add some extra logging for light debugging

3 years agoDupliObject: Remove unused and confusing index argument from the context
Sergey Sharybin [Thu, 28 Jul 2016 08:42:52 +0000 (10:42 +0200)]
DupliObject: Remove unused and confusing index argument from the context

3 years agoCurve Fitting: Use normalized projection function
Campbell Barton [Thu, 28 Jul 2016 08:33:14 +0000 (18:33 +1000)]
Curve Fitting: Use normalized projection function

3 years agoFix T48404: Translate fails w/ snap orientation option
Campbell Barton [Thu, 28 Jul 2016 08:11:43 +0000 (18:11 +1000)]
Fix T48404: Translate fails w/ snap orientation option

Rotate the object around the snap-target so it meets the snap-point.

3 years agoCleanup: unused transform member
Campbell Barton [Thu, 28 Jul 2016 06:55:57 +0000 (16:55 +1000)]
Cleanup: unused transform member

3 years agoFix T48961: Material slots become easily desynced over linked duplicates.
Bastien Montagne [Thu, 28 Jul 2016 07:23:46 +0000 (09:23 +0200)]
Fix T48961: Material slots become easily desynced over linked duplicates.

Own mistake in recent changes (split to test_object_materials()/test_all_objects_materials()).

3 years agoFix crash fitting single point curve
Campbell Barton [Thu, 28 Jul 2016 04:12:12 +0000 (14:12 +1000)]
Fix crash fitting single point curve

3 years agoUse COMPAT_ENGINES instead of RenderEngine.use_game_engine for panel poll methods
Mitchell Stokes [Tue, 5 Jul 2016 05:05:32 +0000 (22:05 -0700)]
Use COMPAT_ENGINES instead of RenderEngine.use_game_engine for panel poll methods

This mostly affects physics panels. Any engines relying on
RenderEngine.use_game_engine flag to show/hide panels will need to be
updated. The COMPAT_ENGINES technique is how we usually deal with this.
One issue with use_game_engine is that I cannot find a way to set it; it
appears only the BGE can set it. This means (without this commit)
external RenderEngines cannot get rid of the default physics panels.

The RE_GAME flag (the C flag behind use_game_engine) is pretty hacky
and we should look into removing its usage where possible.

3 years agoFix T48951: Crash refreshing some popups
Campbell Barton [Thu, 28 Jul 2016 01:08:01 +0000 (11:08 +1000)]
Fix T48951: Crash refreshing some popups

Fix for T48874 caused popups to be tagged to be refreshed, that didnt support it.

Tag popups that can't be refreshed.

3 years agoAdd comments on behavior of spacedata and regionbase lists
Julian Eisel [Thu, 28 Jul 2016 00:36:12 +0000 (02:36 +0200)]
Add comments on behavior of spacedata and regionbase lists

3 years agoFix own mistake from c05363e8895
Julian Eisel [Thu, 28 Jul 2016 00:23:32 +0000 (02:23 +0200)]
Fix own mistake from c05363e8895

Didn't know slink->regionbase is removed when area is active. Don't see why this is done, but it's confusing :S

3 years agoFix T48790: Cycles render bug with zero strength lights.
Brecht Van Lommel [Wed, 27 Jul 2016 21:09:38 +0000 (23:09 +0200)]
Fix T48790: Cycles render bug with zero strength lights.

3 years agoFix crash closing Blender while in rendered local view
Julian Eisel [Wed, 27 Jul 2016 19:05:44 +0000 (21:05 +0200)]
Fix crash closing Blender while in rendered local view

Happens because it was always using regionbase of active/visible area, not the correct one of the (possibly inactive) 3D view. Was pretty hidden because you had to be in local view to trigger it.
Could also remove ScrArea * argument from SpaceType.id_remap now, but leaving in there to avoid bigger changes (might also be useful for some case).

Steps to reproduce:
* Default startup.blend
* Enter local view with default cube (/-key)
* Render (or open a different editor where the 3D View is)
* Close Blender - should invoke crash

3 years agoFix memory leak when closing Blender with operator popup open
Julian Eisel [Wed, 27 Jul 2016 17:45:43 +0000 (19:45 +0200)]
Fix memory leak when closing Blender with operator popup open

Steps to reproduce:
* Default startup.blend
* RMB-Click on "Cube" item in outliner
* Select Remap Users
* Close Blender using window 'x' button

3 years agoFix T48946: Blender+Tahiti+DRI3+Unity+Linux GUI corruption/not rendering
Sergey Sharybin [Wed, 27 Jul 2016 14:06:18 +0000 (16:06 +0200)]
Fix T48946: Blender+Tahiti+DRI3+Unity+Linux GUI corruption/not rendering

Enable triple buffer by default for AMD cards on opensource driver.

Should be safe now, since it was only old cards causing problems,
which we don't support now most likely anyway.

3 years agoAvoid creating multiple outputs connected to the same socket when creating a node...
Lukas Stockner [Wed, 27 Jul 2016 13:53:32 +0000 (15:53 +0200)]
Avoid creating multiple outputs connected to the same socket when creating a node group

This patch fixes the annoyance that when creating a node group where one of its nodes is connected
to several other nodes, a separate output will be created for each link, even though they're all
connected to the same socket in the group.
Now, before adding an output for an outgoing link, the existing outputs are checked to find whether
any output is already connected to the same socket. If such an output is found, it is reused instead of
creating a new one.

Reviewers: Severin

Subscribers: Blendify

Differential Revision: https://developer.blender.org/D1836

3 years agoFix T48061: Crash with adaptive domain and cases when there's no smoke
Alexander Gavrilov [Wed, 27 Jul 2016 13:40:32 +0000 (15:40 +0200)]
Fix T48061: Crash with adaptive domain and cases when there's no smoke

3 years agoFix T48760: Changing Renderlayer Compositor node Layer does not update enabled output...
Sergey Sharybin [Wed, 27 Jul 2016 13:17:15 +0000 (15:17 +0200)]
Fix T48760: Changing Renderlayer Compositor node Layer does not update enabled outputs until script is finished

3 years agoCycles: Style, placement of asteric in pointers
Sergey Sharybin [Wed, 27 Jul 2016 12:10:09 +0000 (14:10 +0200)]
Cycles: Style, placement of asteric in pointers

Seems we are using `void *` much much more often in Cycles.

3 years agoCycles: Some minor tweaks to emission sharder
Sergey Sharybin [Wed, 27 Jul 2016 12:04:28 +0000 (14:04 +0200)]
Cycles: Some minor tweaks to emission sharder

- Nodification of shader nodes changed default strength from 10 to 1.
  If that was intentional, IMO should happen as a separate commit.

- Fixed indentation.

3 years agoFix T48829: Memory leak on Blender Exit
Sergey Sharybin [Wed, 27 Jul 2016 08:59:09 +0000 (10:59 +0200)]
Fix T48829: Memory leak on Blender Exit

It was possible to have missing outlink but GPUNodes in material.

3 years agoFix T48950: Movie Clip mode segfaults
Sergey Sharybin [Wed, 27 Jul 2016 08:18:54 +0000 (10:18 +0200)]
Fix T48950: Movie Clip mode segfaults

Missing linking code in blenloader.

3 years agoCorrect UI names of ID types
Julian Eisel [Tue, 26 Jul 2016 18:15:00 +0000 (20:15 +0200)]
Correct UI names of ID types

Also correct typo.

3 years agoMore useful block name for report popup blocks
Julian Eisel [Tue, 26 Jul 2016 17:30:18 +0000 (19:30 +0200)]
More useful block name for report popup blocks

Report popups simply reuse popup menu code, so their blocks got "UI_popup_menu_begin" assigned as name, which was a bit misleading. Now uses "UI_popup_menu_reports".
Ideally they'd have their own popup code.

3 years agoFix T45936: invalid cycles motion blur for particle rotation and children.
Alexander Gavrilov [Tue, 26 Jul 2016 16:00:07 +0000 (18:00 +0200)]
Fix T45936: invalid cycles motion blur for particle rotation and children.

Commit rB709ca0ece changed how rotation was handled for particles so
that unless actual rotation physics is enabled, there is no rotation.
However it only updated ptcache_particle_read, forgetting to change
exactly the same code in ptcache_particle_interpolate.

This means that for subframes old code that computes a rotation from
velocity is used, resulting in completely different rotation than for
integer frames. This causes rotational motion blur by itself, and also
mangles motion blur paths of child particles.

Reviewers: sergey, lukastoenne

Maniphest Tasks: T45936

Differential Revision: https://developer.blender.org/D2124

3 years agoFix T48813: Custom icon is not drawn on header / addons prefs panel.
Bastien Montagne [Tue, 26 Jul 2016 15:55:18 +0000 (17:55 +0200)]
Fix T48813: Custom icon is not drawn on header / addons prefs panel.

For now use 'brute force' and refresh whole UI when new icons get rendered.

See comment of T48813 for ideas about how to handle that in future (2.8 project ?).

3 years agoCycles: Proper fix for buffer overflow in volume intersect all
Sergey Sharybin [Tue, 26 Jul 2016 14:56:40 +0000 (16:56 +0200)]
Cycles: Proper fix for buffer overflow in volume intersect all