Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@gmail.com>2018-07-15 14:18:38 +0300
committerLukas Toenne <lukas.toenne@gmail.com>2018-07-15 14:18:38 +0300
commita89bcac14b083ef723d8d4a464ca75942743ec89 (patch)
treecf9f51999d9bc51a6ae1fa0648108d23612bdbaa /source/blender/depsgraph/intern/builder/deg_builder_relations.cc
parentff8df843c31cb41621204c579dbc34e8ce185708 (diff)
parenta9be42dfa284be0742de2719ea90671612240705 (diff)
Merge branch 'hair_guides' into hair_guides_grooming
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc31
1 files changed, 25 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index aea81263f81..4a250292f83 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -682,7 +682,7 @@ void DepsgraphRelationBuilder::build_object_data_lamp(Object *object)
build_lamp(lamp);
ComponentKey object_parameters_key(&object->id, DEG_NODE_TYPE_PARAMETERS);
ComponentKey lamp_parameters_key(&lamp->id, DEG_NODE_TYPE_PARAMETERS);
- add_relation(lamp_parameters_key, object_parameters_key, "Lamp -> Object");
+ add_relation(lamp_parameters_key, object_parameters_key, "Light -> Object");
}
void DepsgraphRelationBuilder::build_object_data_lightprobe(Object *object)
@@ -1983,7 +1983,7 @@ void DepsgraphRelationBuilder::build_lamp(Lamp *lamp)
build_nodetree(lamp->nodetree);
ComponentKey lamp_parameters_key(&lamp->id, DEG_NODE_TYPE_PARAMETERS);
ComponentKey nodetree_key(&lamp->nodetree->id, DEG_NODE_TYPE_SHADING);
- add_relation(nodetree_key, lamp_parameters_key, "NTree->Lamp Parameters");
+ add_relation(nodetree_key, lamp_parameters_key, "NTree->Light Parameters");
build_nested_nodetree(&lamp->id, lamp->nodetree);
}
}
@@ -2201,7 +2201,7 @@ void DepsgraphRelationBuilder::build_nested_shapekey(ID *owner, Key *key)
void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node)
{
ID *id_orig = id_node->id_orig;
-
+ const ID_Type id_type = GS(id_orig->name);
TimeSourceKey time_source_key;
OperationKey copy_on_write_key(id_orig,
DEG_NODE_TYPE_COPY_ON_WRITE,
@@ -2224,9 +2224,28 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
/* Component explicitly requests to not add relation. */
continue;
}
- int rel_flag = 0;
- if (comp_node->type == DEG_NODE_TYPE_ANIMATION) {
- rel_flag |= DEPSREL_FLAG_NO_FLUSH;
+ int rel_flag = DEPSREL_FLAG_NO_FLUSH;
+ if (id_type == ID_ME && comp_node->type == DEG_NODE_TYPE_GEOMETRY) {
+ rel_flag &= ~DEPSREL_FLAG_NO_FLUSH;
+ }
+ /* 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
* copy of ID.