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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-07-18 18:08:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-19 16:20:06 +0300
commitac136babb53d280744b107b873c65580315a13d6 (patch)
tree61e05bc55ed4d0cf10f32e363df61de6d366dde8 /source/blender/depsgraph
parent3efde4a03c55820a8a1704f0b0a30bbe1e8157a9 (diff)
Depsgraph: Restore ID datablock tag when Object is tagged with OB_RECALC_DATA
Was lost in one of the previous commits.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 883eadedb39..db7d2a4323b 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -176,6 +176,19 @@ void id_tag_update_object_data(Depsgraph *graph, IDDepsNode *id_node)
return;
}
data_comp->tag_update(graph);
+ /* Special legacy compatibility code, tag data ID for update when object
+ * is tagged for data update.
+ */
+ if (idtype == ID_OB) {
+ Object *object = (Object *)id_node->id_orig;
+ ID *data_id = (ID *)object->data;
+ if (data_id != NULL) {
+ IDDepsNode *data_id_node = graph->find_id_node(data_id);
+ BLI_assert(data_id_node != NULL);
+ /* TODO(sergey): Do we want more granular tags here? */
+ data_id_node->tag_update(graph);
+ }
+ }
}
/* Tag corresponding to OB_RECALC_TIME. */