[Bf-blender-cvs] [64aadc7c7de] blender2.8: Depsgraph: Avoid use of 0 tag flag on build finish

Sergey Sharybin noreply at git.blender.org
Wed Jun 13 09:50:08 CEST 2018


Commit: 64aadc7c7dec0016c658bbccb706238dd4616965
Author: Sergey Sharybin
Date:   Wed Jun 13 09:49:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB64aadc7c7dec0016c658bbccb706238dd4616965

Depsgraph: Avoid use of 0 tag flag on build finish

Use all the explicit tagging. Solves characters being in T-pose after
opening specific scene files.

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

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

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index f1f3da85968..1b2dcd8fcf8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -30,9 +30,14 @@
 
 #include "intern/builder/deg_builder.h"
 
+#include "DNA_anim_types.h"
 #include "DNA_object_types.h"
 #include "DNA_ID.h"
 
+extern "C" {
+#include "BKE_animsys.h"
+}
+
 #include "intern/depsgraph.h"
 #include "intern/depsgraph_types.h"
 #include "intern/eval/deg_eval_copy_on_write.h"
@@ -53,12 +58,17 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
 	foreach (IDDepsNode *id_node, graph->id_nodes) {
 		ID *id = id_node->id_orig;
 		id_node->finalize_build(graph);
+		int flag = DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY;
 		if ((id->recalc & ID_RECALC_ALL)) {
-			DEG_id_tag_update_ex(bmain, id_node->id_orig, 0);
+			AnimData *adt = BKE_animdata_from_id(id);
+			if (adt != NULL && (adt->recalc & ADT_RECALC_ANIM) != 0) {
+				flag |= DEG_TAG_TIME;
+			}
 		}
 		if (!deg_copy_on_write_is_expanded(id_node->id_cow)) {
-			DEG_id_tag_update_ex(bmain, id_node->id_orig, DEG_TAG_COPY_ON_WRITE);
+			flag |= DEG_TAG_COPY_ON_WRITE;
 		}
+		DEG_id_tag_update_ex(bmain, id_node->id_orig, flag);
 	}
 }



More information about the Bf-blender-cvs mailing list