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>2018-06-13 10:49:14 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-13 10:49:14 +0300
commit64aadc7c7dec0016c658bbccb706238dd4616965 (patch)
treef0dea2b8ff0da8f0a0513b2289b2a294d349a6a8 /source/blender/depsgraph
parent813a538a57b2f3567e1adf03473fe4cccbbb4513 (diff)
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.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder.cc14
1 files changed, 12 insertions, 2 deletions
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);
}
}