Commit: ef30fa3739a5d23a8c9acfbfc12f0f612e59dc89
Author: Sergey Sharybin
Date:   Wed Jul 11 12:55:03 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBef30fa3739a5d23a8c9acfbfc12f0f612e59dc89

Fix crash in combing after changing scene property

===================================================================

M       source/blender/depsgraph/intern/builder/deg_builder_relations.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc 
b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 23e50f125ba..bba1ba67962 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2213,7 +2213,23 @@ void 
DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
                if (id_type == ID_ME && comp_node->type == 
DEG_NODE_TYPE_GEOMETRY) {
                        rel_flag &= ~DEPSREL_FLAG_NO_FLUSH;
                }
-               if (comp_node->type == DEG_NODE_TYPE_PARAMETERS) {
+               /* Notes on exceptions:
+                * - Parameters component is where drivers are living. Changing 
any
+                *   of the (custom) properties in the original datablock (even 
the
+                *   ones which do not imply other component update) need to 
make
+                *   sure drivers are properly updated.
+                *   This way, for example, changing ID property will properly 
poke
+                *   all drivers to be updated.
+                *
+                * - View layers have cached array of bases in them, which is 
not
+                *   copied by copy-on-write, and not preserved. PROBABLY it is 
better
+                *   to preserve that cache in copy-on-write, but for the time 
being
+                *   we allow flush to layer collections component which will 
ensure
+                *   that cached array fo bases exists and is up-to-date.
+                */
+               if (comp_node->type == DEG_NODE_TYPE_PARAMETERS ||
+                   comp_node->type == DEG_NODE_TYPE_LAYER_COLLECTIONS)
+               {
                        rel_flag &= ~DEPSREL_FLAG_NO_FLUSH;
                }
                /* All entry operations of each component should wait for a 
proper

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to