2 years agoBlender 2.78b: Point addons to an updated revision v2.78b
Sergey Sharybin [Wed, 8 Feb 2017 13:50:08 +0000 (14:50 +0100)]
Blender 2.78b: Point addons to an updated revision

2 years agoBlender release: We are officially 'b' now
Sergey Sharybin [Fri, 3 Feb 2017 16:54:08 +0000 (17:54 +0100)]
Blender release: We are officially 'b' now

2 years ago[msvc] cmake fixes to support the recent for oiio/ffmpeg/numpy version changes.
lazydodo [Fri, 3 Feb 2017 16:47:54 +0000 (09:47 -0700)]
[msvc] cmake fixes to support the recent for oiio/ffmpeg/numpy version changes.

2 years agoFix fluid sim build error with MSVC.
Brecht Van Lommel [Mon, 3 Oct 2016 20:07:13 +0000 (22:07 +0200)]
Fix fluid sim build error with MSVC.

2 years agoFluids: improve multithreaded CPU usage.
Brecht Van Lommel [Sun, 2 Oct 2016 13:43:02 +0000 (15:43 +0200)]
Fluids: improve multithreaded CPU usage.

Fixes for clamp-omp, fewer shared variables, fix some cases of threads writing
to the same memory location. Issue found by Jens Verwiebe, who reports 30%
speedup with 16 core CPU, when using this with a recent clang-omp version.

2 years agoCycles tests: Allow python auto-exec
Sergey Sharybin [Wed, 1 Feb 2017 09:13:40 +0000 (10:13 +0100)]
Cycles tests: Allow python auto-exec

2 years agoCycles: Fix rng_state initialization when using resumable rendering
Lukas Stockner [Wed, 1 Feb 2017 04:43:17 +0000 (05:43 +0100)]
Cycles: Fix rng_state initialization when using resumable rendering

2 years agoFix compilation error with latest OIIO 1.7.8
Sergey Sharybin [Tue, 29 Nov 2016 11:40:38 +0000 (12:40 +0100)]
Fix compilation error with latest OIIO 1.7.8

There are some changes in OIIO includes so now need to do some
things differently.

2 years agoReturn correct alpha for environment map in GLSL
Alexander Romanov [Tue, 17 Jan 2017 08:52:02 +0000 (11:52 +0300)]
Return correct alpha for environment map in GLSL

2 years agoFix T49405: Crash when baking with adaptive subdivision
Mai Lavelle [Wed, 25 Jan 2017 05:35:20 +0000 (00:35 -0500)]
Fix T49405: Crash when baking with adaptive subdivision

Blenders baking system currently doesn't support the topology used by
adaptive subdivision and primitive ids will be wrong or out of range
leading to crashes. Updating the baking system to support other
topologies would be a bit involved, so for now we simply disable
subdivision while baking to avoid crashes.

2 years agoCycles: Don't rely on indirectly included algorithm
Sergey Sharybin [Tue, 24 Jan 2017 15:39:16 +0000 (16:39 +0100)]
Cycles: Don't rely on indirectly included algorithm

2 years agoCycles: Fix typo in the panel name
Sergey Sharybin [Mon, 23 Jan 2017 09:35:15 +0000 (10:35 +0100)]
Cycles: Fix typo in the panel name

No user visible changes, it was a typo in the name of the class.

Spotted by povmaniac in IRC, thanks!

2 years agoCycles: Update current Cycles version
Sergey Sharybin [Mon, 23 Jan 2017 09:23:09 +0000 (10:23 +0100)]
Cycles: Update current Cycles version

2 years agoFix T50491: Cycles UI breaks when pushing F8.
Bastien Montagne [Sun, 22 Jan 2017 11:42:14 +0000 (12:42 +0100)]
Fix T50491: Cycles UI breaks when pushing F8.

Cycles add-on did not actually support reloading correctly.

When you want to correctly reload sub-modules (i.e. modules of an add-on
which is a package), you need to use importlib, a mere import will do
nothing with already loaded modules (RNA classes are sort of
pre-registered when they are evaluated, through the meta-class system).

2 years agoCycles: Use more const qualifiers to avoid possible issues
Sergey Sharybin [Fri, 20 Jan 2017 16:54:17 +0000 (17:54 +0100)]
Cycles: Use more const qualifiers to avoid possible issues

2 years agoCycles: Cleanup, split one gigantic function into two smaller ones
Sergey Sharybin [Fri, 20 Jan 2017 16:52:48 +0000 (17:52 +0100)]
Cycles: Cleanup, split one gigantic function into two smaller ones

2 years agoCycles: Store time in BVH nodes
Sergey Sharybin [Tue, 17 Jan 2017 14:34:18 +0000 (15:34 +0100)]
Cycles: Store time in BVH nodes

This way we can stop traversing BVH node early on.

Gives about 2-2.5x times render time improvement with 3 BVH steps.
Hopefully this gives no measurable performance loss for scenes with
single BVH step.

Traversal is currently only implemented for QBVH, meaning old CPUs
and GPU do not benefit from this change.

2 years agoCycles: Add option to split triangle motion primitives by time steps
Sergey Sharybin [Tue, 17 Jan 2017 14:13:01 +0000 (15:13 +0100)]
Cycles: Add option to split triangle motion primitives by time steps

Similar to the previous commit, the statistics goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0                46                    260
    1                27                    373
    2                18                    598
    3                15                    826

Scene used for the tests is the agent's body from one of the barber
shop scenes (no textures or anything, just a diffuse material).

Once again this is limited to regular (non-spatial split) BVH,
Support of spatial split to this feature will come later.

2 years agoCycles: Add option to split curve motion primitives by time steps
Sergey Sharybin [Tue, 17 Jan 2017 13:37:32 +0000 (14:37 +0100)]
Cycles: Add option to split curve motion primitives by time steps

The idea is to create several smaller BVH nodes for each of the motion
curve primitives. This acts as a forced spatial split for the single

This gives up render time speedup of motion blurred hair in the cost
of extra memory usage. The numbers goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0               258                    191
    1               123                    278
    2                69                    453
    3                43                    627

Scene used for the tests is the agent's hair from one of the barber
shop scenes.

Currently it's only limited to scenes without spatial split enabled,
since the spatial split builder requires some changes to work properly
with motion steps coordinates.

2 years agoCycles: Add utility function to calculate curve boundbox from given 4 keys
Sergey Sharybin [Tue, 17 Jan 2017 13:23:29 +0000 (14:23 +0100)]
Cycles: Add utility function to calculate curve boundbox from given 4 keys

Also fixed some issues with motion keys calculation:

- Clamp lower and upper limits of curves so we can safely call those
  functions for the very first and very last curve segment.
- Fixed wrong indexing for the curve radius array.
- Fixed wrong motion attribute offset calculation.

2 years agoCycles: Cleanup, trailing whitespace
Sergey Sharybin [Tue, 17 Jan 2017 11:12:14 +0000 (12:12 +0100)]
Cycles: Cleanup, trailing whitespace

2 years agoCycles: Split motion triangle file once again, avoids annoying forward declarations
Sergey Sharybin [Tue, 17 Jan 2017 09:58:04 +0000 (10:58 +0100)]
Cycles: Split motion triangle file once again, avoids annoying forward declarations

2 years agoCycles: Move motion triangle intersection functions to own file
Sergey Sharybin [Tue, 17 Jan 2017 09:48:56 +0000 (10:48 +0100)]
Cycles: Move motion triangle intersection functions to own file

Mimics how regular triangles are working and makes it more clear where
the stuff is located in the kernel.

Needed to have some forward declarations because of the current placement
of things in the kernel.

2 years agoCycles: Cleanup, better variable name
Sergey Sharybin [Mon, 16 Jan 2017 19:27:05 +0000 (20:27 +0100)]
Cycles: Cleanup, better variable name

2 years agoCycles: Add utility function to fetch motion keys while on CPU side
Sergey Sharybin [Mon, 16 Jan 2017 19:26:17 +0000 (20:26 +0100)]
Cycles: Add utility function to fetch motion keys while on CPU side

2 years agoCycles: Cleanup, comments
Sergey Sharybin [Mon, 16 Jan 2017 19:08:19 +0000 (20:08 +0100)]
Cycles: Cleanup, comments

2 years agoCycles: Add utility function to fetch motion triangle when on CPU side
Sergey Sharybin [Mon, 16 Jan 2017 18:56:40 +0000 (19:56 +0100)]
Cycles: Add utility function to fetch motion triangle when on CPU side

2 years agoCycles: Cleanup, delete trailing whitespace
Sergey Sharybin [Mon, 16 Jan 2017 17:59:22 +0000 (18:59 +0100)]
Cycles: Cleanup, delete trailing whitespace

2 years agoFix T50460. Greying out issue with Cycles culling options.
Thomas Dinges [Fri, 20 Jan 2017 09:58:03 +0000 (10:58 +0100)]
Fix T50460. Greying out issue with Cycles culling options.

2 years agoFix T50517: Rendering expecting time is negative
Sergey Sharybin [Wed, 25 Jan 2017 10:18:12 +0000 (11:18 +0100)]
Fix T50517: Rendering expecting time is negative

2 years agoFIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data...
lazydodo [Tue, 15 Nov 2016 20:21:01 +0000 (13:21 -0700)]
FIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data types , to force aligned on 16 byte boundaries.

2 years agoFix T49857: Blender crashes after adding texture node to compositing tree
Sergey Sharybin [Thu, 3 Nov 2016 09:25:31 +0000 (10:25 +0100)]
Fix T49857: Blender crashes after adding texture node to compositing tree

2 years agoCycles: Fix compilation error on with older GCC
Sergey Sharybin [Fri, 20 Jan 2017 10:55:48 +0000 (11:55 +0100)]
Cycles: Fix compilation error on with older GCC

Hopefully it works on all platforms now.

2 years agoDepsgraph: Bone parent should also include armature transform relation
Sergey Sharybin [Fri, 9 Dec 2016 12:05:39 +0000 (13:05 +0100)]
Depsgraph: Bone parent should also include armature transform relation

It is required to have world-space bone position, which consists of armature
object transform and local bone transform.

2 years agoDepsgraph: Only re-schedule objects which are on visible layers
Sergey Sharybin [Tue, 6 Dec 2016 13:48:48 +0000 (14:48 +0100)]
Depsgraph: Only re-schedule objects which are on visible layers

Otherwise it's possible to cause infinite update loop in Cycles viewport.

Gets a bit messy logic, need to revisit this..

2 years agoDepsgraph: Use HIGH priority for scheduled tasks
Sergey Sharybin [Mon, 5 Dec 2016 15:31:34 +0000 (16:31 +0100)]
Depsgraph: Use HIGH priority for scheduled tasks

This kind of keeps threads "warmer" and should in theory give better
cache coherency bringing some %% of speedup. It was already tested
few months ago and it gave few % speedup in barber shop, but was
reverted due to some bone popping. The popping is now fixed so it
should be fine to use new scheduling policy.

2 years agoDepsgraph: avoid more transitive relations for rigid body simulation
Sergey Sharybin [Mon, 5 Dec 2016 15:30:30 +0000 (16:30 +0100)]
Depsgraph: avoid more transitive relations for rigid body simulation

2 years agoDepsgraph: Rigid body simulation doesn't need explicit time relation
Sergey Sharybin [Mon, 5 Dec 2016 15:03:10 +0000 (16:03 +0100)]
Depsgraph: Rigid body simulation doesn't need explicit time relation

It'll be dependent on time via Time Source -> Rebuild RB World chain.

2 years agoDepsgraph: Avoid transitive relation from local transform to final
Sergey Sharybin [Mon, 5 Dec 2016 14:59:31 +0000 (15:59 +0100)]
Depsgraph: Avoid transitive relation from local transform to final

There is always an uber eval node on the way. so we can avoid creating
some relations here in order to speed up both construction time and

2 years agoFix depsgraph: hair collision is actually enabled, so add the relations.
Alexander Gavrilov [Mon, 5 Dec 2016 10:35:24 +0000 (13:35 +0300)]
Fix depsgraph: hair collision is actually enabled, so add the relations.

2 years agoDepsgraph: Fix matrix_world driver source
Sergey Sharybin [Wed, 23 Nov 2016 10:09:05 +0000 (11:09 +0100)]
Depsgraph: Fix matrix_world driver source

Reported by Dalai in IRC, thanks!

2 years agoFix T49981: New Depsgraph - When camera is on inactive layer, it does not evaluate...
Sergey Sharybin [Mon, 21 Nov 2016 13:36:36 +0000 (14:36 +0100)]
Fix T49981: New Depsgraph - When camera is on inactive layer, it does not evaluate constraints

2 years agoDepsgraph: Fix infinite viewport object update in CYcles render mode
Sergey Sharybin [Mon, 21 Nov 2016 11:00:09 +0000 (12:00 +0100)]
Depsgraph: Fix infinite viewport object update in CYcles render mode

The issue was caused by wrong object re-tag needed to have proper dependnecies
update for OpenSubdiv.

2 years agoDepsgraph: use more explicit parenthesis
Sergey Sharybin [Mon, 21 Nov 2016 10:05:56 +0000 (11:05 +0100)]
Depsgraph: use more explicit parenthesis

2 years agoDepsgraph: Fix residue of debug-only code
Sergey Sharybin [Fri, 18 Nov 2016 16:47:17 +0000 (17:47 +0100)]
Depsgraph: Fix residue of debug-only code

2 years agoFix copy/paste typo in new depsgraph object geometry builder (found by coverity).
Bastien Montagne [Fri, 18 Nov 2016 10:55:28 +0000 (11:55 +0100)]
Fix copy/paste typo in new depsgraph object geometry builder (found by coverity).

2 years agoDepsgrpah: Fix missing animation update in movie clips
Sergey Sharybin [Thu, 17 Nov 2016 15:37:25 +0000 (16:37 +0100)]
Depsgrpah: Fix missing animation update in movie clips

2 years agoDepsgraph: Move scene builder function to own file
Sergey Sharybin [Thu, 17 Nov 2016 14:38:03 +0000 (15:38 +0100)]
Depsgraph: Move scene builder function to own file

This way it's much easier to grasp what the graph actually contains.

2 years agoFix T50060: New depsgraph does not update mask animation
Sergey Sharybin [Thu, 17 Nov 2016 14:29:22 +0000 (15:29 +0100)]
Fix T50060: New depsgraph does not update mask animation

2 years agoDepsgraph: Use utility macro to iterate over linked list
Sergey Sharybin [Thu, 17 Nov 2016 14:11:55 +0000 (15:11 +0100)]
Depsgraph: Use utility macro to iterate over linked list

This will be compiled into same exact code, just saves us from
doing annoying type casts all over the place.

2 years agoDepsgraph: Move rig builder functions to own files
Sergey Sharybin [Thu, 17 Nov 2016 13:34:46 +0000 (14:34 +0100)]
Depsgraph: Move rig builder functions to own files

Those routines are rather big and started to be annoying to have
one big file.

Should be no functional changes.

2 years agoDepsgraph: Fix typo in previous optimization commit
Sergey Sharybin [Tue, 15 Nov 2016 10:30:21 +0000 (11:30 +0100)]
Depsgraph: Fix typo in previous optimization commit

Was a residue from another experiment, caused infinite loop when
reporting dependency cycles.

2 years agoAtomics: Make naming more obvious about which value is being returned
Sergey Sharybin [Tue, 15 Nov 2016 11:16:26 +0000 (12:16 +0100)]
Atomics: Make naming more obvious about which value is being returned

2 years agoFix T49994: Setting dupligroup which uses indirect relation will crash
Sergey Sharybin [Fri, 11 Nov 2016 15:15:34 +0000 (16:15 +0100)]
Fix T49994: Setting dupligroup which uses indirect relation will crash

Did similar trick to old dependency graph: tag invisible relations for update.

Might need some re-consideration, see the comment.

This should solve our issues with powerlib addon here in the studio.

2 years agoDepsgraph: Add missing NULL pointer check
Sergey Sharybin [Fri, 11 Nov 2016 14:28:34 +0000 (15:28 +0100)]
Depsgraph: Add missing NULL pointer check

2 years agoDepsgraph: Fix missing DONE flag in relations builder
Sergey Sharybin [Fri, 11 Nov 2016 14:20:17 +0000 (15:20 +0100)]
Depsgraph: Fix missing DONE flag in relations builder

Was causing relations be build twice in certain cases.

2 years agoFix T49993: Indirectly used taper/bevel crashes new dependency graph
Sergey Sharybin [Fri, 11 Nov 2016 13:46:19 +0000 (14:46 +0100)]
Fix T49993: Indirectly used taper/bevel crashes new dependency graph

New dependency graph expects strict separation between nodes and relations builder,
meaning, if we try to create relation with an object which is not in the graph yet
we'll have an error in depsgraph.

Now, so far object nodes were created from bases of the current scene, which caused
missing objects in graph in certain cases.

Didn't find better approach than to simply ensure object nodes exists when we know
they'll be used by relation builder.

2 years agoDepsgraph: Fix typo in text on curve relation builder
Sergey Sharybin [Fri, 11 Nov 2016 13:41:02 +0000 (14:41 +0100)]
Depsgraph: Fix typo in text on curve relation builder

2 years agoDepsgraph: Fix missing ID node tag
Sergey Sharybin [Fri, 11 Nov 2016 13:25:26 +0000 (14:25 +0100)]
Depsgraph: Fix missing ID node tag

Might have caused nodes created multiple times for the same object.

2 years agoDepsgraph: Add some data builder logic to corresponding function
Sergey Sharybin [Fri, 11 Nov 2016 13:24:47 +0000 (14:24 +0100)]
Depsgraph: Add some data builder logic to corresponding function

2 years agoDepsgraph: cleanup, no functional changes
Sergey Sharybin [Fri, 11 Nov 2016 12:52:22 +0000 (13:52 +0100)]
Depsgraph: cleanup, no functional changes

2 years agoDepsgraph: Fix another issue which seems to be a bug
Sergey Sharybin [Thu, 10 Nov 2016 14:49:33 +0000 (15:49 +0100)]
Depsgraph: Fix another issue which seems to be a bug

Similar to a previous commit.

Doing separately for an easy of bisect.

2 years agoDepsgraph: Fix wrong relation from IK solver to pole target
Sergey Sharybin [Thu, 10 Nov 2016 14:46:22 +0000 (15:46 +0100)]
Depsgraph: Fix wrong relation from IK solver to pole target

Copy paste error...

How to avoid those?

2 years agoDepsgraph: Disable timing profile
Sergey Sharybin [Mon, 7 Nov 2016 11:50:45 +0000 (12:50 +0100)]
Depsgraph: Disable timing profile

2 years agofix building depsgraph after recent changes
Martijn Berger [Mon, 7 Nov 2016 11:32:00 +0000 (12:32 +0100)]
fix building depsgraph after recent changes

2 years agoDepsgraph: Do not rely on indirectly included cstring
Sergey Sharybin [Mon, 7 Nov 2016 11:09:42 +0000 (12:09 +0100)]
Depsgraph: Do not rely on indirectly included cstring

Also add comment why exactly cstring is needed.

2 years agoDespgraph: Optimize cycles detection algorithm
Sergey Sharybin [Fri, 4 Nov 2016 16:45:14 +0000 (17:45 +0100)]
Despgraph: Optimize cycles detection algorithm

The idea is simple: when falling back to one of the nodes which was partially
handled we "resume" checking outgoing relations from the index which we stopped.

This gives about 15-20% depsgraph construction time save.

2 years agoDepsgraph: Speedup initial rig build time
Sergey Sharybin [Thu, 3 Nov 2016 16:47:38 +0000 (17:47 +0100)]
Depsgraph: Speedup initial rig build time

We don't need to sort bone channels, it's all taken care about
by the depsgraph itself.

Gives up to 30% initial rig construction time speedup.

2 years agoDepsgraph: Move key implementation from header to dedicated file
Sergey Sharybin [Thu, 3 Nov 2016 15:25:26 +0000 (16:25 +0100)]
Depsgraph: Move key implementation from header to dedicated file

2 years agoDepsgraph: Move class implementation from header to implementation files
Sergey Sharybin [Thu, 3 Nov 2016 15:03:12 +0000 (16:03 +0100)]
Depsgraph: Move class implementation from header to implementation files

This is more proper way to go:

- Avoids re-compilation of all dependent files when implementation changes
  without changed API,

- Linker should have much simpler time now de-duplicating and getting rid
  of redundant implementations.

2 years agoDepsgraph: Fully switch from string to const char*
Sergey Sharybin [Thu, 3 Nov 2016 13:45:47 +0000 (14:45 +0100)]
Depsgraph: Fully switch from string to const char*

This brings up to 10-20% depsgraph build time improvement in the layout
files from the studio repository.

2 years agoDepsgraph: Add extra name tag for operation nodes
Sergey Sharybin [Thu, 3 Nov 2016 13:31:27 +0000 (14:31 +0100)]
Depsgraph: Add extra name tag for operation nodes

The idea here is to address issue that name on it's own is not
always unique: for example, when adding driver operations the
name used for nodes is the RNA path (and multiple drivers can
write to different array indices of the path). Basically, now
it's possible to pass extra integer value to distinguish
operations in such cases.

So now we've already switched from sprintf() to construct unique
operation name to pass RNA path and array index.

There should be no functional changes yet, but this work is
required for further work about replacing string with const

2 years agoDepsgraph: Cleanup, operation has name, not description
Sergey Sharybin [Thu, 3 Nov 2016 13:22:41 +0000 (14:22 +0100)]
Depsgraph: Cleanup, operation has name, not description

Hopefully should make things more clear here.

2 years agoDepsgraph: Remove unused function
Sergey Sharybin [Thu, 3 Nov 2016 13:18:19 +0000 (14:18 +0100)]
Depsgraph: Remove unused function

A residue from times where we thought to do partial graph updates,
which we are not committing any time soon.

2 years agoDepsgraph: Use const char for component API
Sergey Sharybin [Thu, 3 Nov 2016 11:14:47 +0000 (12:14 +0100)]
Depsgraph: Use const char for component API

2 years agoDepsgraph: Remove some includes which seems unused
Sergey Sharybin [Thu, 3 Nov 2016 11:08:47 +0000 (12:08 +0100)]
Depsgraph: Remove some includes which seems unused

2 years agoDepsgraph: Use const char instead of string in part of drivers construction
Sergey Sharybin [Thu, 3 Nov 2016 11:01:45 +0000 (12:01 +0100)]
Depsgraph: Use const char instead of string in part of drivers construction

2 years agoDepsgraph: Switch away form string to const char* for node names
Sergey Sharybin [Thu, 3 Nov 2016 10:50:18 +0000 (11:50 +0100)]
Depsgraph: Switch away form string to const char* for node names

There is no real reason to have nodes storing heap-allocated name
and description. Doing this increases amount of allocations during
dependency graph building, which usually means somewhat slowness.

We're temporarily loosing some eyecandy in the graphviz visualizer,
but those we can bring back as a part of graphiz dump (which happens
much less often than depsgraph build).

This will happen in multiple commits for the ease of bisect in the
future just in case this causes any regression. This commit contains
ID creation API changes.

2 years agoDepsgraph: Remove prototype of unused and non-implemented method
Sergey Sharybin [Thu, 3 Nov 2016 10:36:35 +0000 (11:36 +0100)]
Depsgraph: Remove prototype of unused and non-implemented method

2 years agoDepsgraph: Add code for timing despgraph builder
Sergey Sharybin [Thu, 3 Nov 2016 12:24:41 +0000 (13:24 +0100)]
Depsgraph: Add code for timing despgraph builder

2 years agoFix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color
Sergey Sharybin [Thu, 3 Nov 2016 10:31:49 +0000 (11:31 +0100)]
Fix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color

The issue was caused by image ID nodes not being in the depsgraph.

Now, tricky part: we only add nodes but do not add relations yet. Reasoning:

- It's currently important to only call editor's ID update callback to solve
  the issue, without need to flush changes somewhere deeper.

- Adding relations might cause some unwanted updates, so will leave that for
  a later investigation.

2 years agoDepsgraph: Fix wrong comparison of ID type vs. node type
Sergey Sharybin [Thu, 3 Nov 2016 10:19:42 +0000 (11:19 +0100)]
Depsgraph: Fix wrong comparison of ID type vs. node type

2 years agoDepsgraph: Fix race condition writing drivers to array property
Sergey Sharybin [Wed, 2 Nov 2016 17:05:38 +0000 (18:05 +0100)]
Depsgraph: Fix race condition writing drivers to array property

Animation system has separate fcurves for each of array elements and
dependency graph creates separate nodes for each of fcurve, This is
needed to keep granularity of updates, but causes issues because
animation system will actually write the whole array to property when
modifying single value (this is a limitation of RNA API).

Worked around by adding operation relation between array drivers
so we never write same array form multiple threads.

2 years agoDepsgraph: Fix some errors printed to the console
Sergey Sharybin [Wed, 2 Nov 2016 11:23:00 +0000 (12:23 +0100)]
Depsgraph: Fix some errors printed to the console

They were not real issues, it's just some areas of code tried to create
relations between non-existing nodes without checking whether such
relations are really needed.

Now it should be easier to see real bugs printed.

Hopefully should be no regressions here.

2 years agoPartial fix for T49836: Camera DOF properties not updating via graph editor
Sergey Sharybin [Tue, 25 Oct 2016 14:53:13 +0000 (16:53 +0200)]
Partial fix for T49836: Camera DOF properties not updating via graph editor

Do this for the new dependency graph: was missing handle of OB_UPDATE_TIME in tag update.

Hopefully it's all correct still.

Old dependency graph needs work, but i'm tempting to call it unsupported and move on
to 2.8 branch.

2 years agoDepsgraph: Report proper error when modifier fails to create relation link
Sergey Sharybin [Fri, 30 Sep 2016 09:05:01 +0000 (11:05 +0200)]
Depsgraph: Report proper error when modifier fails to create relation link

2 years agoDepsgraph: Avoid some false-positive time dependencies of scripted drivers
Sergey Sharybin [Thu, 15 Sep 2016 10:12:59 +0000 (12:12 +0200)]
Depsgraph: Avoid some false-positive time dependencies of scripted drivers

This was quite weak to consider all scripted expression to be time-dependent.
Current solution is somewhat better but still crappy. Not sure how can we make
it really nice.

2 years agoSolve threading conflict when calculating smooth normals
Sergey Sharybin [Wed, 2 Nov 2016 14:09:32 +0000 (15:09 +0100)]
Solve threading conflict when calculating smooth normals

It was possible to have synchronization issues whe naccumulating smooth
normal to a vertex, causing shading artifacts during playback.

Bug found by Dalai, thanks!

2 years agoRNA: Expose autosmooth face splitting
Sergey Sharybin [Wed, 11 Jan 2017 14:59:32 +0000 (15:59 +0100)]
RNA: Expose autosmooth face splitting

This way render engine can request mesh to be auto-split and not
worry about implementing this functionality on it's own.

Please note that this split is to be performed prior to tessellation.

2 years agoFix compile error (-Werror=float-conversion).
Thomas Dinges [Fri, 20 Jan 2017 09:50:55 +0000 (10:50 +0100)]
Fix compile error (-Werror=float-conversion).

2 years agoCycles: Expose diffuse and glossy depth to Light Path node
Sergey Sharybin [Tue, 6 Dec 2016 15:15:36 +0000 (16:15 +0100)]
Cycles: Expose diffuse and glossy depth to Light Path node

Was a bit confusing to have transparent and translucent depth
exposed but no diffuse or glossy.

Reviewers: brecht

Subscribers: eyecandy

Differential Revision:

2 years agoCycles: Don't use fast math for the host code
Sergey Sharybin [Thu, 19 Jan 2017 13:48:43 +0000 (14:48 +0100)]
Cycles: Don't use fast math for the host code

This is important for the reliable behavior or isnan/isfinite/min/max
functions to work with nan and non-finite values. Some of the issues
with fast math are possible to work around, but didn't find a way to
have reliable min/max implementation yet.

2 years agoCycles: Add fast-math safe isnan and isfinite
Sergey Sharybin [Thu, 19 Jan 2017 13:41:04 +0000 (14:41 +0100)]
Cycles: Add fast-math safe isnan and isfinite

Currently unused, but might become really handy in the future.

2 years agoCycles: Remove using namespace hell
Sergey Sharybin [Thu, 19 Jan 2017 13:24:14 +0000 (14:24 +0100)]
Cycles: Remove using namespace hell

Please NEVER EVER use such a statement, it's only causing HUGE
issues. What is even worse: it's not always possible to immediately
see that the hell is coming from such a statement.

There is still some statements in the existing code, will leave
those for a later cleanup.

2 years agoCycles: Fix amount of rendered samples not being shown while rendering the last tile...
Lukas Stockner [Wed, 18 Jan 2017 23:39:52 +0000 (00:39 +0100)]
Cycles: Fix amount of rendered samples not being shown while rendering the last tile on CPU

2 years agoCycles: Cleanup, spelling
Sergey Sharybin [Mon, 16 Jan 2017 16:55:41 +0000 (17:55 +0100)]
Cycles: Cleanup, spelling

2 years agoCycles: Cleanup, avoid shadowing
Sergey Sharybin [Mon, 16 Jan 2017 16:54:39 +0000 (17:54 +0100)]
Cycles: Cleanup, avoid shadowing

2 years agoCycles: Fix wrong transparent shadows for motion blur hair
Sergey Sharybin [Fri, 13 Jan 2017 14:41:20 +0000 (15:41 +0100)]
Cycles: Fix wrong transparent shadows for motion blur hair

This was a missing bit from b53ce9a.

2 years agoCycles: Cleanup, style
Sergey Sharybin [Fri, 13 Jan 2017 14:24:56 +0000 (15:24 +0100)]
Cycles: Cleanup, style

2 years agoCycles: Simplify some code in Curve BVH reference fill
Sergey Sharybin [Fri, 13 Jan 2017 09:59:34 +0000 (10:59 +0100)]
Cycles: Simplify some code in Curve BVH reference fill

makes code slightly shorter and uses idea of const qualifiers.