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:
authorClément Foucault <foucault.clem@gmail.com>2022-01-12 14:43:40 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-12 14:44:26 +0300
commite5766752d04794c2693dedad75baeb8c7d68f4cf (patch)
tree7f5354d1272612a32c28bfda4c03259970c402b7 /source/blender/depsgraph
parentb2ccd8546c7249a5ce279210d45ddbb5e90cd10d (diff)
Revert "BLI: Refactor vector types & functions to use templates"
Reverted because the commit removes a lot of commits. This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc11
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_factory.h2
2 files changed, 12 insertions, 1 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");
+ }
}
}
diff --git a/source/blender/depsgraph/intern/node/deg_node_factory.h b/source/blender/depsgraph/intern/node/deg_node_factory.h
index 125f340a0fa..b3153a7ddfb 100644
--- a/source/blender/depsgraph/intern/node/deg_node_factory.h
+++ b/source/blender/depsgraph/intern/node/deg_node_factory.h
@@ -55,7 +55,7 @@ template<class ModeObjectType> struct DepsNodeFactoryImpl : public DepsNodeFacto
void register_node_typeinfo(DepsNodeFactory *factory);
/* Get typeinfo for specified type */
-DepsNodeFactory *type_get_factory(const NodeType type);
+DepsNodeFactory *type_get_factory(NodeType type);
} // namespace deg
} // namespace blender