diff options
author | Luc Revardel <luc.revardel@gmail.com> | 2020-04-21 16:07:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-04-21 16:27:21 +0300 |
commit | 23919d2275f22b44e1da6bc3860a66db03579f2f (patch) | |
tree | 9dfd2b34b8144eeecbbfeb6b79d62e8f9599bd01 /source/blender | |
parent | 6505dd198503eda512d286640e881452cbaeeb41 (diff) |
Fix T75845: some dependencies update missing when painting textures.
issue: Painting a texture that is set as a particle system influencer, doesn't
update particles. An external trigger (such as changing influence slider)
is required to update particles.
fix: The root cause is a missing relationship from image to texture in the
dependency graph.
test: Once fixed, image texture painting updates expected dependencies
such as particle system influence or displacement modifier.
Reviewed By: sergey
Maniphest Tasks: T75845
Differential Revision: https://developer.blender.org/D7472
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 1adf7c09c28..d5a3d5ee121 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2349,21 +2349,27 @@ void DepsgraphRelationBuilder::build_texture(Tex *texture) return; } /* texture itself */ + ComponentKey texture_key(&texture->id, NodeType::GENERIC_DATABLOCK); build_animdata(&texture->id); build_parameters(&texture->id); + /* texture's nodetree */ build_nodetree(texture->nodetree); + build_nested_nodetree(&texture->id, texture->nodetree); + /* Special cases for different IDs which texture uses. */ if (texture->type == TEX_IMAGE) { if (texture->ima != nullptr) { build_image(texture->ima); + + ComponentKey image_key(&texture->ima->id, NodeType::GENERIC_DATABLOCK); + add_relation(image_key, texture_key, "Texture Image"); } } - build_nested_nodetree(&texture->id, texture->nodetree); + if (check_id_has_anim_component(&texture->id)) { ComponentKey animation_key(&texture->id, NodeType::ANIMATION); - ComponentKey datablock_key(&texture->id, NodeType::GENERIC_DATABLOCK); - add_relation(animation_key, datablock_key, "Datablock Animation"); + add_relation(animation_key, texture_key, "Datablock Animation"); } } |