[Bf-blender-cvs] [ac136babb53] blender2.8: Depsgraph: Restore ID datablock tag when Object is tagged with OB_RECALC_DATA

Sergey Sharybin noreply at git.blender.org
Wed Jul 19 17:33:55 CEST 2017


Commit: ac136babb53d280744b107b873c65580315a13d6
Author: Sergey Sharybin
Date:   Tue Jul 18 17:08:29 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBac136babb53d280744b107b873c65580315a13d6

Depsgraph: Restore ID datablock tag when Object is tagged with OB_RECALC_DATA

Was lost in one of the previous commits.

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

M	source/blender/depsgraph/intern/depsgraph_tag.cc

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

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. */




More information about the Bf-blender-cvs mailing list