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:
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 1c09417e9ab..fcdc3fe58e8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1475,6 +1475,17 @@ void DepsgraphRelationBuilder::build_animation_images(ID *id)
id, NodeType::IMAGE_ANIMATION, OperationCode::IMAGE_ANIMATION);
TimeSourceKey time_src_key;
add_relation(time_src_key, image_animation_key, "TimeSrc -> Image Animation");
+
+ /* The image users of these ids may change during evaluation. Make sure that the image
+ * animation update happens after evaluation. */
+ if (GS(id->name) == ID_MA) {
+ OperationKey material_update_key(id, NodeType::SHADING, OperationCode::MATERIAL_UPDATE);
+ add_relation(material_update_key, image_animation_key, "Material Update -> Image Animation");
+ }
+ else if (GS(id->name) == ID_WO) {
+ OperationKey world_update_key(id, NodeType::SHADING, OperationCode::WORLD_UPDATE);
+ add_relation(world_update_key, image_animation_key, "World Update -> Image Animation");
+ }
}
}