blender-staging.git
2 years agoCode cleanup: make L_transparent part of PathRadiance.
Brecht Van Lommel [Sat, 12 Aug 2017 21:15:58 +0000 (23:15 +0200)]
Code cleanup: make L_transparent part of PathRadiance.

2 years agoCode cleanup: make DebugData part of PathRadiance.
Brecht Van Lommel [Sat, 12 Aug 2017 19:07:55 +0000 (21:07 +0200)]
Code cleanup: make DebugData part of PathRadiance.

2 years agoCode cleanup: make it easier to test only Sobol, CMJ or Pseudorandom.
Brecht Van Lommel [Sat, 12 Aug 2017 21:04:58 +0000 (23:04 +0200)]
Code cleanup: make it easier to test only Sobol, CMJ or Pseudorandom.

2 years agoCycles: optimize CPU split kernel data init.
Brecht Van Lommel [Sun, 6 Aug 2017 15:17:40 +0000 (17:17 +0200)]
Cycles: optimize CPU split kernel data init.

2 years agoCode cleanup: remove unused Cycles random number code.
Brecht Van Lommel [Sun, 6 Aug 2017 19:14:58 +0000 (21:14 +0200)]
Code cleanup: remove unused Cycles random number code.

2 years agoFix T52372: CUDA build error after recent changes.
Brecht Van Lommel [Sat, 12 Aug 2017 18:36:48 +0000 (20:36 +0200)]
Fix T52372: CUDA build error after recent changes.

2 years agoWM: load UI for new file, even when pref disabled
Campbell Barton [Sat, 12 Aug 2017 15:05:10 +0000 (01:05 +1000)]
WM: load UI for new file, even when pref disabled

Loading startup file always loads the UI now.

2 years agoFix T52368: OSL trace() crash after recent changes.
Brecht Van Lommel [Sat, 12 Aug 2017 12:32:52 +0000 (14:32 +0200)]
Fix T52368: OSL trace() crash after recent changes.

2 years agoFix T52298: hidden lamps still compute shadow buffers in viewport.
Brecht Van Lommel [Sat, 12 Aug 2017 11:22:26 +0000 (13:22 +0200)]
Fix T52298: hidden lamps still compute shadow buffers in viewport.

2 years agoCode cleanup: fix warning and improve terminology.
Brecht Van Lommel [Fri, 11 Aug 2017 12:21:34 +0000 (14:21 +0200)]
Code cleanup: fix warning and improve terminology.

2 years agoFix T52329: Boolean with aligned shapes failed
Campbell Barton [Sat, 12 Aug 2017 08:14:50 +0000 (18:14 +1000)]
Fix T52329: Boolean with aligned shapes failed

Creating ngons with multiple axis aligned shapes in the middle of a
single face would fail in some cases.

This exposed multiple problems in BM_face_split_edgenet_connect_islands

- Islands needed to be sorted on Y axis when X was aligned.
- Checking edge intersections needed increased endpoint bias.
- BVH epsilon needed to be increased.

2 years agoMath Lib: add isect_seg_seg_v2_point_ex
Campbell Barton [Sat, 12 Aug 2017 08:12:29 +0000 (18:12 +1000)]
Math Lib: add isect_seg_seg_v2_point_ex

This exposes end-point bias argument, needed in rare cases.

2 years agoFix width estimation for buttons with short labels in pie menus
Aleksandr Zinovev [Sat, 12 Aug 2017 08:00:19 +0000 (11:00 +0300)]
Fix width estimation for buttons with short labels in pie menus

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

To be backported to 2.79 branch

2 years agoCleanup: whitespace
Campbell Barton [Sat, 12 Aug 2017 03:37:34 +0000 (13:37 +1000)]
Cleanup: whitespace

2 years agoiFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.
Bastien Montagne [Fri, 11 Aug 2017 16:02:54 +0000 (18:02 +0200)]
iFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.

'OpenGL Preview' checkbox was redundant now, just use seq_prev_type
value only.

Might be OK for 2.79, but should be double-checked first...

2 years agoFix T52149: LoopTriArray computation was not correctly protected against concurrency.
Bastien Montagne [Fri, 11 Aug 2017 14:51:19 +0000 (16:51 +0200)]
Fix T52149: LoopTriArray computation was not correctly protected against concurrency.

Note: this commit seems to work as expected (also with transform
snapping etc.). However, it is rather unsafe - not enough for 2.79 at
least, unless we get much more testing on it. It also depends on three
previous ones.

Note that using a global lock here is far from ideal, we should rather
have a lock per DM, but that will do for now, whole DM thing is doomed
to oblivion anyway in 2.8.

Also, we may need a `DM_DIRTY_LOOPTRIS` dirty flag at some point. Looks
like we can survive without it for now though... Probably because cached
looptris are never copied accross DM's?

2 years agoCleanup: remove useless `DM_ensure_looptri()`.
Bastien Montagne [Fri, 11 Aug 2017 14:18:01 +0000 (16:18 +0200)]
Cleanup: remove useless `DM_ensure_looptri()`.

That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...

2 years agoFix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again...
Bastien Montagne [Fri, 11 Aug 2017 13:53:38 +0000 (15:53 +0200)]
Fix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again from DM.

This was... horribly wrong, CDDM will often *not* need to allocate
anything to return arrays of mesh items! Just check whether array
pointer is NULL.

Also, remove `DM_get_looptri_array`, that one is useless currently,
`dm->getLoopTriArray` will always return cached array (computing it if
needed).

2 years agoCleanup: deduplicate DM's getLoopTriArray() callback.
Bastien Montagne [Fri, 11 Aug 2017 13:41:53 +0000 (15:41 +0200)]
Cleanup: deduplicate DM's getLoopTriArray() callback.

All three functions were doing exactly the same thing, simpler to only
have one in that case!

2 years agoFix T52346: Alt-I (Delete Keyframes) on a NlaStrip's Extrapolate property would crash
Joshua Leung [Fri, 11 Aug 2017 13:52:51 +0000 (01:52 +1200)]
Fix T52346: Alt-I (Delete Keyframes) on a NlaStrip's Extrapolate property would crash

2 years agoFix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from...
Joshua Leung [Fri, 11 Aug 2017 13:40:28 +0000 (01:40 +1200)]
Fix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from Selected Channels

The tweakmode flag and the selected-channels flag accidentally
used the same value, due to confusion over where these flags were
supposed to be set. The selected-channels flag has now been moved
to use a different value, so that there shouldn't be any further
conflicts.

To be ported to 2.79.

2 years agoFix bevel clamping bugs T51247 and T50819.
Howard Trickey [Fri, 11 Aug 2017 13:13:27 +0000 (09:13 -0400)]
Fix bevel clamping bugs T51247 and T50819.

Old bevel 'Clamp overlap' code was very naive: just limit amount
to half edge length. This uses more accurate (but not perfect)
calculations for the max amount before (many) geometry collisions
happen. This is not a backward compatible change - meshes that
have modifiers with 'Clamp overlap' will likely have larger allowed
bevel widths now. But that can be fixed by turning off clamp overlap
and setting the amount to the desired value.

2 years agoObject Apply Transform: option to apply properties
Campbell Barton [Fri, 11 Aug 2017 12:16:44 +0000 (22:16 +1000)]
Object Apply Transform: option to apply properties

In some cases users may want to disable this option
to avoid changing other properties besides vertex locations.

2 years agoFix T52344: Softbody on Text.
Bastien Montagne [Fri, 11 Aug 2017 12:25:36 +0000 (14:25 +0200)]
Fix T52344: Softbody on Text.

Own previous fix (rBd5d626df236b) was not valid, curves are actually
supported by SoftBodies. It was rather a mere UI bug, which was not
including Surfaces and Font obect types in those valid for softbody UI.

Thanks to @brecht for the head up!

Also, fix safe for 2.79, btw.

2 years agoCycles: Clarify new argument in PathRadiance
Sergey Sharybin [Fri, 11 Aug 2017 10:46:09 +0000 (12:46 +0200)]
Cycles: Clarify new argument in PathRadiance

2 years agoCycles tests: Draw images on top of checkerboard
Sergey Sharybin [Fri, 11 Aug 2017 07:34:34 +0000 (09:34 +0200)]
Cycles tests: Draw images on top of checkerboard

This way it's easier to see alpha-channel only images, such as shadow catcher
images on transparent film.

2 years agoFix T52229: Shadow Catcher artifacts when under transparency
Sergey Sharybin [Fri, 11 Aug 2017 07:33:18 +0000 (09:33 +0200)]
Fix T52229: Shadow Catcher artifacts when under transparency

Added some extra tirckery to avoid background being tinted dark with transparent
surface. Maybe a bit hacky, but seems to work fine.

2 years agoPie menu's sub-rows ignore 'EXPAND' flag
Aleksandr Zinovev [Fri, 11 Aug 2017 10:18:30 +0000 (13:18 +0300)]
Pie menu's sub-rows ignore 'EXPAND' flag

Regression, to be backported in 2.79.

2 years agoRNA: Operators were excluded from struct map
Campbell Barton [Fri, 11 Aug 2017 10:09:22 +0000 (20:09 +1000)]
RNA: Operators were excluded from struct map

Recent changes meant structs that were registered without a name
wouldn't get added to the map.
Now assigning identifiers manages the struct-map.

2 years agoGHash: note that 'deprecated' is used for private
Campbell Barton [Fri, 11 Aug 2017 09:04:41 +0000 (19:04 +1000)]
GHash: note that 'deprecated' is used for private

2 years agoError in last commit, problems with unregister
Campbell Barton [Fri, 11 Aug 2017 09:09:03 +0000 (19:09 +1000)]
Error in last commit, problems with unregister

We can't free the identifier before its used when
removing from the ghash.

2 years agoFix T52344: Softbody on Text.
Bastien Montagne [Fri, 11 Aug 2017 08:24:57 +0000 (10:24 +0200)]
Fix T52344: Softbody on Text.

For some reasons (c) softbody modifier was marked as compatible with
curves... Would need much more work though, so for now just removing
that flag!

2 years agoRNA: Use hash lookups for structs
Campbell Barton [Fri, 11 Aug 2017 07:51:38 +0000 (17:51 +1000)]
RNA: Use hash lookups for structs

Adding structs was checking for duplicates
causing approx 75k string comparisons on startup.

While overall speedup is minimal,
Python access to `bpy.types` will now use a hash lookup
instead of a full linked list search.

See D2774

2 years agoWM: don't load preferences on 'File -> New'
Campbell Barton [Thu, 10 Aug 2017 23:29:25 +0000 (09:29 +1000)]
WM: don't load preferences on 'File -> New'

User preferences are now only loaded on...

- Initial startup.
- Factory-settings.
- Setting app-templates.

2 years agoCycles: remove square samples option.
Brecht Van Lommel [Wed, 2 Aug 2017 13:39:02 +0000 (15:39 +0200)]
Cycles: remove square samples option.

It doesn't seem that useful in practice, was mostly added to match some
other renderers but also seems to be causing user confusing and accidental
long render times. So let's just keep the UI simple and remove this.

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

2 years agoCycles: change defaults for filter glossy, clamp and branched path AA.
Brecht Van Lommel [Wed, 2 Aug 2017 13:29:08 +0000 (15:29 +0200)]
Cycles: change defaults for filter glossy, clamp and branched path AA.

We're adding some bias by default, which now I think is the right thing
to do from a usability point of view since you really need to use those
options anyway to get clean renders in a practical time.

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

2 years agoCycles: add denoising tests, keep new image even if no reference exists.
Brecht Van Lommel [Thu, 10 Aug 2017 22:38:39 +0000 (00:38 +0200)]
Cycles: add denoising tests, keep new image even if no reference exists.

2 years agoFix T52322: denoiser broken on Windows after recent changes.
Brecht Van Lommel [Thu, 10 Aug 2017 21:38:20 +0000 (23:38 +0200)]
Fix T52322: denoiser broken on Windows after recent changes.

It's not clear why this only happened on Windows, but the code
was wrong and should do a bitcast here instead of conversion.

2 years agoFix crash checking for Blender version 10+
Campbell Barton [Thu, 10 Aug 2017 22:56:57 +0000 (08:56 +1000)]
Fix crash checking for Blender version 10+

PyAPI could trigger this, for now just truncate.

2 years agoCleanup: redundant 'static' variable
Campbell Barton [Thu, 10 Aug 2017 22:48:15 +0000 (08:48 +1000)]
Cleanup: redundant 'static' variable

Also use BLI_snprintf.

2 years agoFix OSX duplicate path in Python's sys.path
Campbell Barton [Thu, 10 Aug 2017 22:42:27 +0000 (08:42 +1000)]
Fix OSX duplicate path in Python's sys.path

The '..' in the path caused simple comparisons to fail.

D2780 by @akitula

2 years agoCleanup: whitespace
Campbell Barton [Thu, 10 Aug 2017 22:32:05 +0000 (08:32 +1000)]
Cleanup: whitespace

2 years agoCMake: only build msgfmt if international is used
Campbell Barton [Thu, 10 Aug 2017 22:13:16 +0000 (08:13 +1000)]
CMake: only build msgfmt if international is used

Changes to BLI would always rebuild msgfmt.

2 years agoFix install_deps usage of patches.
Bastien Montagne [Thu, 10 Aug 2017 13:55:19 +0000 (15:55 +0200)]
Fix install_deps usage of patches.

Who in Hell did rename those files and did not update accordingly
install_deps.sh script???

2 years agoDPI: add back option to control line width, tweak default width.
Brecht Van Lommel [Mon, 7 Aug 2017 20:42:47 +0000 (22:42 +0200)]
DPI: add back option to control line width, tweak default width.

Adds thin/default/thick modes to add -1/0/1 to the auto detected line width,
while leaving the overall UI scale unchanged.

Also tweaks the default line width threshold, so thicker lines start from
slightly high UI scales.

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

2 years agoFix T52334: images with non-color data should not change color space on save.
Brecht Van Lommel [Thu, 10 Aug 2017 12:11:18 +0000 (14:11 +0200)]
Fix T52334: images with non-color data should not change color space on save.

2 years agoTweak and extend POV syntax hilghting.
Bastien Montagne [Thu, 10 Aug 2017 13:29:19 +0000 (15:29 +0200)]
Tweak and extend POV syntax hilghting.

*Changed categories of some keywords
*reordered some longer keywords that didn't appear
*Activated another color (reserved builtins) by Leonid
*added some HGPOV and UberPOV missing keywords

Patch by Maurice Raybaud (@mauriceraybaud). Thanks to Leonid for additions, feedback and Linux testing.
Related diffs: D2754 and D2755.

While not a regression, this is new feature and would be nice to have it
backported to final 2.79.

2 years agoCleanup: make seq dupli scene operands' names match global copying convention.
Bastien Montagne [Thu, 10 Aug 2017 13:06:53 +0000 (15:06 +0200)]
Cleanup: make seq dupli scene operands' names match global copying convention.

Followup to rB1037b90cb831b, forgot to save that file :(

2 years agoCleanup: de-duplicate makefile OS checks
Campbell Barton [Thu, 10 Aug 2017 12:36:47 +0000 (22:36 +1000)]
Cleanup: de-duplicate makefile OS checks

2 years agoCleanup: make seq dupli scene operands' names match global copying convention.
Bastien Montagne [Thu, 10 Aug 2017 11:00:01 +0000 (13:00 +0200)]
Cleanup: make seq dupli scene operands' names match global copying convention.

2 years agoFix T52332: crash when duplicating sequencer strips.
Bastien Montagne [Thu, 10 Aug 2017 10:56:32 +0000 (12:56 +0200)]
Fix T52332: crash when duplicating sequencer strips.

Bug introduced in recent ID copying refactor.

This commit basically sanitizes seq strip copying behavior, by making
destination scene pointer mandatory (and source one a const one).
Nothing then prevents you from using same pointer as source and
destination!

2 years agoFix T52324: Metaball disappears when deleting first metaball object.
Bastien Montagne [Thu, 10 Aug 2017 10:32:50 +0000 (12:32 +0200)]
Fix T52324: Metaball disappears when deleting first metaball object.

Lost specific MBall 'need update' case here in last year's refactor.

While technically not a regression, nice to have in 2.79.

2 years agoCleanup & fix potential NULL pointer dereferencing.
Bastien Montagne [Thu, 10 Aug 2017 08:27:47 +0000 (10:27 +0200)]
Cleanup & fix potential NULL pointer dereferencing.

2 years agoFix T52314: New ID copy code (rBrB9da7dfa1586d) Breaks node previews in compositor.
Bastien Montagne [Thu, 10 Aug 2017 08:26:22 +0000 (10:26 +0200)]
Fix T52314: New ID copy code (rBrB9da7dfa1586d) Breaks node previews in compositor.

"Just" forgot to copy data block's name in 'NO_MAIN' case... *sigh*

2 years agoCycles: Fix instanced shadow catcher objects influencing each other
Sergey Sharybin [Thu, 10 Aug 2017 07:22:33 +0000 (09:22 +0200)]
Cycles: Fix instanced shadow catcher objects influencing each other

2 years agoCycles: De-duplicate trace-time object visibility calculation
Sergey Sharybin [Thu, 10 Aug 2017 07:19:40 +0000 (09:19 +0200)]
Cycles: De-duplicate trace-time object visibility calculation

We already have enough files to worry about in BVH builders. no need to add yet
another copy-paste code which is tempting to be running out of sync.

2 years agoForgot to change magicnumber of OIIO built lib in previous commit...
Bastien Montagne [Wed, 9 Aug 2017 16:21:35 +0000 (18:21 +0200)]
Forgot to change magicnumber of OIIO built lib in previous commit...

2 years agoinstall_deps: disable PTex in our OIIO building for now, broken on newest systems.
Bastien Montagne [Wed, 9 Aug 2017 16:16:21 +0000 (18:16 +0200)]
install_deps: disable PTex in our OIIO building for now, broken on newest systems.

2 years agoFix typo in new ID copying code.
Bastien Montagne [Wed, 9 Aug 2017 12:38:07 +0000 (14:38 +0200)]
Fix typo in new ID copying code.

2 years agoCycles: Remove ulong usage
Sergey Sharybin [Wed, 9 Aug 2017 11:44:21 +0000 (13:44 +0200)]
Cycles: Remove ulong usage

This is a bit confusing, especially when one mixes OpenCL code where ulong equals
to uint64_t with CPU side code where ulong is expected to be something else from
the naming.

This commit makes it so we use explicit name, common on all platforms.

2 years agoFix T52240: Alembic Not Transferring Materials Per Frame
Sybren A. Stüvel [Wed, 9 Aug 2017 11:05:22 +0000 (13:05 +0200)]
Fix T52240: Alembic Not Transferring Materials Per Frame

When a mesh changes its number of vertices during the animation,
Blender rebuilds the DerivedMesh, after which the materials weren't
applied any more (causing the default to the first material slot).

2 years agoAlembic: Renamed variable assigned_name → assigned_mat
Sybren A. Stüvel [Wed, 9 Aug 2017 09:44:22 +0000 (11:44 +0200)]
Alembic: Renamed variable assigned_name → assigned_mat

The variable is a pointer to a Material, not to a name/string.

2 years agoTypo fix
Sybren A. Stüvel [Wed, 9 Aug 2017 09:51:21 +0000 (11:51 +0200)]
Typo fix

2 years agoFixed Alembic unit test
Sybren A. Stüvel [Wed, 9 Aug 2017 11:59:27 +0000 (13:59 +0200)]
Fixed Alembic unit test

Commit b6d7cdd3cee9312156e20783248a3b12420b7a53 changed how the mesh data
is deformed, which wasn't taken into account yet in this unit test.

Instead of directly reading the mesh vertices (which aren't animated any
more), we convert the modified mesh to a new one, and inspect those
vertices instead.

2 years agoFix T52315: Crash on duplicating Scene without world.
Bastien Montagne [Wed, 9 Aug 2017 08:43:04 +0000 (10:43 +0200)]
Fix T52315: Crash on duplicating Scene without world.

Regression from rBa7b3047cefcbf, to be backported to 2.79.

Like... seriously... :|

2 years agoCycles: Proper fix for recent OpenCL image crash
Mai Lavelle [Wed, 9 Aug 2017 08:24:26 +0000 (04:24 -0400)]
Cycles: Proper fix for recent OpenCL image crash

Problem was that some code checks to see if device_pointer is null or
not and the new allocator wasn't even setting the pointer to anything
as it tracks memory location separately. Setting the pointer to non
null keeps all users of device_pointer happy.

2 years agoRevert "Cycles: Fix crash changing image after recent OpenCL changes"
Mai Lavelle [Wed, 9 Aug 2017 08:24:03 +0000 (04:24 -0400)]
Revert "Cycles: Fix crash changing image after recent OpenCL changes"

This reverts commit f2809ae0a671057caa1005e2b9cc91648c33dd1f.

2 years agoModules test: Don't print backtrace for files which are ignored
Sergey Sharybin [Wed, 9 Aug 2017 07:42:03 +0000 (09:42 +0200)]
Modules test: Don't print backtrace for files which are ignored

This could make output really polluted, where it'll be hard to see actual
issues.

It is still possible to have all backtraces printed using BLENDER_VERBOSE
environment variable.

2 years agoFix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79
Lukas Stockner [Tue, 8 Aug 2017 21:00:02 +0000 (23:00 +0200)]
Fix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79

As part of the fix for T51587, I removed the Depth output for non-Multilayer
images since it seemed weird that PNGs etc. that don't have a Z pass still get
a socket for it.
However, I forgot about non-multilayer EXRs, which are a special case that can
actually have a Z pass.

Therefore, this commit brings back the Depth output for non-multilayer images
just like it was in 2.78.

2 years agoCycles: More fixes for Windows 32 bit
Sergey Sharybin [Tue, 8 Aug 2017 20:32:51 +0000 (22:32 +0200)]
Cycles: More fixes for Windows 32 bit

- Apparently MSVC does not support compound literals
  in C++ (at least by the looks of it).

- Not sure how opencl_device_assert was managing to
  set protected property of the Device class.

2 years agoCycles: Fix compilation error of filter kernels on 32 bit Windows
Sergey Sharybin [Tue, 8 Aug 2017 19:56:32 +0000 (21:56 +0200)]
Cycles: Fix compilation error of filter kernels on 32 bit Windows

We don't enable global SSE optimizations in regular kernel, and we
keep those disabled on Linux 32bit.

One possible workaround would be to pass arguments by ccl_ref, but
that is quite a few of code which better be done accurately.

2 years agoFix T51701: Alembic cache screws up mesh.
Bastien Montagne [Tue, 8 Aug 2017 16:21:08 +0000 (18:21 +0200)]
Fix T51701: Alembic cache screws up mesh.

Use same trick as in DataTransfer modifier e.g. to avoid modifying
existing mesh's data.

2 years agoCycles: Fix crash changing image after recent OpenCL changes
Sergey Sharybin [Tue, 8 Aug 2017 15:17:04 +0000 (17:17 +0200)]
Cycles: Fix crash changing image after recent OpenCL changes

Steps to reproduce:
- Create shader Image texture -> Diffuse BSDF -> Output. Do NOT select image yet!
- Start viewport render.
- Select image from the ID browser of Image Texture node.

Thing is: with the memory manager we always need to inform device that memory
was freed.

2 years agoCycles: Fix compilation error without C++11
Sergey Sharybin [Tue, 8 Aug 2017 15:02:08 +0000 (17:02 +0200)]
Cycles: Fix compilation error without C++11

Common folks, nobody considered master a C++11 only branch. Such decision is to
be done officially and will involve changes in quite a few infrastructure related
areas.

2 years agoFix fixed width box layouts
Aleksandr Zinovev [Tue, 8 Aug 2017 14:37:21 +0000 (17:37 +0300)]
Fix fixed width box layouts

Regression, to be backported in 2.79.

2 years agoCleanup: mostly namings in `make_object_duplilist_real` code.
Bastien Montagne [Tue, 8 Aug 2017 14:08:24 +0000 (16:08 +0200)]
Cleanup: mostly namings in `make_object_duplilist_real` code.

2 years agoFix T52260: Blender 2.79 Objects made duplicates real still refer armature proxy.
Bastien Montagne [Tue, 8 Aug 2017 14:01:48 +0000 (16:01 +0200)]
Fix T52260: Blender 2.79 Objects made duplicates real still refer armature proxy.

New code was handling correctly ID's internal references to self, but
not references between 'made real' different objects...

Regression, to be backported in 2.79.

2 years agoFix T52255: New Depsgraph - Constraint and Drivers not working together when the...
Sergey Sharybin [Tue, 8 Aug 2017 13:27:11 +0000 (15:27 +0200)]
Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself

2 years agoDepsgraph: Cleanup, make it easier to debug on laptop
Sergey Sharybin [Tue, 8 Aug 2017 13:24:35 +0000 (15:24 +0200)]
Depsgraph: Cleanup, make it easier to debug on laptop

2 years agoCycles: Cleanup, de-duplicate function parameter list
Sergey Sharybin [Tue, 8 Aug 2017 12:39:00 +0000 (14:39 +0200)]
Cycles: Cleanup, de-duplicate function parameter list

Was only needed to sue const reference on CPU. Now it is done using ccl_ref.

2 years agoCycles: Add utility macro ccl_ref
Sergey Sharybin [Tue, 8 Aug 2017 12:34:59 +0000 (14:34 +0200)]
Cycles: Add utility macro ccl_ref

It is defined to & for CPU side compilation, and defined to an empty for any GPU
platform. The idea here is to use this macro instead of #ifdef block with bunch
of duplicated lines just to make it so CPU code is efficient.

Eventually we might switch to references on CUDA as well, but that would require
some intensive testing.

2 years agoFix T46329: scene_update_{pre,post} doc needs clarification
Sybren A. Stüvel [Tue, 8 Aug 2017 13:13:54 +0000 (15:13 +0200)]
Fix T46329: scene_update_{pre,post} doc needs clarification

The documentation for the bpy.app.handlers.scene_update_{pre,post}
handlers states that they're called "on updating the scenes data".
However, they're called even when the data hasn't changed. Of course
such handlers are useful, but the documentation should reflect the
current behaviour.

Reviewers: mont29, sergey

Subscribers: Blendify

Maniphest Tasks: T46329

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

2 years agoFix width estimation for empty layouts in pie menus
Aleksandr Zinovev [Tue, 8 Aug 2017 12:52:14 +0000 (15:52 +0300)]
Fix width estimation for empty layouts in pie menus

2 years agoUpdate CUEW to latest version
Sergey Sharybin [Tue, 8 Aug 2017 12:26:46 +0000 (14:26 +0200)]
Update CUEW to latest version

Previous update pulled too much of system-wide typedefs.

2 years agoFix T52263: Crash When Splitting and Merging Areas with Header Text Set.
Bastien Montagne [Tue, 8 Aug 2017 12:06:56 +0000 (14:06 +0200)]
Fix T52263: Crash When Splitting and Merging Areas with Header Text Set.

Not a regression, but safe enough to be included in 2.79.

2 years agoUpdate CUDA wrangler to latest version
Sergey Sharybin [Tue, 8 Aug 2017 11:58:07 +0000 (13:58 +0200)]
Update CUDA wrangler to latest version

Brings new declarations from toolkit version 8.0, also fixes some
pointers used in function declarations.

2 years agoCycles: Pack kernel textures into buffers for OpenCL
Mai Lavelle [Tue, 8 Aug 2017 11:12:04 +0000 (07:12 -0400)]
Cycles: Pack kernel textures into buffers for OpenCL

Image textures were being packed into a single buffer for OpenCL, which
limited the amount of memory available for images to the size of one
buffer (usually 4gb on AMD hardware). By packing textures into multiple
buffers that limit is removed, while simultaneously reducing the number
of buffers that need to be passed to each kernel.

Benchmarks were within 2%.

Fixes T51554.

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

2 years agoFix compilation error when building without Blender
Sergey Sharybin [Tue, 8 Aug 2017 09:32:33 +0000 (11:32 +0200)]
Fix compilation error when building without Blender

Simply disabled python tests, they can't be run anyway (since blender target is
not enabled) and we don't have any player-related tests in that folder.

2 years agoCleanup: remove incorrect comment
Campbell Barton [Tue, 8 Aug 2017 01:28:47 +0000 (11:28 +1000)]
Cleanup: remove incorrect comment

enum values aren't saved in files.

2 years agoFix CMake dependencies builder issues on Linux with TBB and Python packages.
Brecht Van Lommel [Tue, 8 Aug 2017 00:32:01 +0000 (02:32 +0200)]
Fix CMake dependencies builder issues on Linux with TBB and Python packages.

2 years agoCycles: Cleanup, move curve intersection functions to own file
Sergey Sharybin [Mon, 7 Aug 2017 17:53:12 +0000 (19:53 +0200)]
Cycles: Cleanup, move curve intersection functions to own file

This way curve file becomes much shorter and it's also easier to write a
benchmark application to check performance before/after future changes.

2 years agoCycles: Cleanup, trailign whitespace
Sergey Sharybin [Mon, 7 Aug 2017 17:48:49 +0000 (19:48 +0200)]
Cycles: Cleanup, trailign whitespace

2 years agoCycles: Cleanup, remove bvh prefix from curve functions
Sergey Sharybin [Mon, 7 Aug 2017 17:47:31 +0000 (19:47 +0200)]
Cycles: Cleanup, remove bvh prefix from curve functions

Those are nothing to do with BVH, and can be used separately.

2 years agoCycles: Fix compilation error on NVidia OpenCL after recent refactor
Sergey Sharybin [Mon, 7 Aug 2017 18:52:24 +0000 (20:52 +0200)]
Cycles: Fix compilation error on NVidia OpenCL after recent refactor

Still need to verify this is proper thing to do for AMD OpenCL. At least now
i can compile OpenCL kernel on my laptop with sm21 card.

2 years agoFix compilation error when rigid body is disabled
Sergey Sharybin [Mon, 7 Aug 2017 18:11:19 +0000 (20:11 +0200)]
Fix compilation error when rigid body is disabled

2 years agoBuild: add scripts to build dependencies for Windows and macOS.
Brecht Van Lommel [Tue, 25 Jul 2017 14:37:55 +0000 (16:37 +0200)]
Build: add scripts to build dependencies for Windows and macOS.

Note these are intended for platform maintainers, we do not intend to
support users making their own builds with these. For that precompiled
libraries from lib/ should be used.

Implemented by Martijn Berger, Ray Molenkamp and Brecht Van Lommel.

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

2 years agoFix Cycles shadow catcher objects influencing each other.
Brecht Van Lommel [Tue, 1 Aug 2017 21:40:38 +0000 (23:40 +0200)]
Fix Cycles shadow catcher objects influencing each other.

Since all the shadow catchers are already assumed to be in the footage,
the shadows they cast on each other are already in the footage too. So
don't just let shadow catchers skip self, but all shadow catchers.

Another justification is that it should not matter if the shadow catcher
is modeled as one object or multiple separate objects, the resulting
render should be the same.

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

2 years agoFix Windows build errors with recent Cycles SIMD refactoring.
Brecht Van Lommel [Mon, 7 Aug 2017 13:30:01 +0000 (15:30 +0200)]
Fix Windows build errors with recent Cycles SIMD refactoring.

2 years agoRefactor ID copying (and to some extent, ID freeing).
Bastien Montagne [Mon, 7 Aug 2017 14:39:55 +0000 (16:39 +0200)]
Refactor ID copying (and to some extent, ID freeing).

This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).

This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.

It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).

Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!

As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.

Design task : T51804
Phab Diff: D2714

2 years agoCycles: Cleanup, space after keyword
Sergey Sharybin [Mon, 7 Aug 2017 12:47:51 +0000 (14:47 +0200)]
Cycles: Cleanup, space after keyword