From 6e00415a85a995f3d976530ea3ba748971292212 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 5 Dec 2018 17:35:13 +0100 Subject: Fix T58679: Missing modifiers update on changes to texture --- source/blender/depsgraph/DEG_depsgraph_build.h | 6 ++++++ source/blender/depsgraph/intern/depsgraph_build.cc | 14 ++++++++++++++ 2 files changed, 20 insertions(+) (limited to 'source/blender/depsgraph') diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h index 14468b33822..a81dd4c8852 100644 --- a/source/blender/depsgraph/DEG_depsgraph_build.h +++ b/source/blender/depsgraph/DEG_depsgraph_build.h @@ -43,6 +43,7 @@ struct Depsgraph; struct CacheFile; struct EffectorWeights; struct Collection; +struct ID; struct Main; struct ModifierData; struct Object; @@ -148,6 +149,11 @@ void DEG_add_object_cache_relation(struct DepsNodeHandle *handle, struct CacheFile *cache_file, eDepsObjectComponentType component, const char *description); +/* Adds relation from DEG_OPCODE_GENERIC_DATABLOCK_UPDATE of a given ID. + * Is used for such entities as textures and images. */ +void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle, + struct ID *id, + const char *description); /* Adds relations from the given component of a given object to the given node * handle AND the component to the point cache component of the node's ID. diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index 408c6abb0c9..5ff504bc8c6 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -185,6 +185,20 @@ void DEG_add_object_pointcache_relation(struct DepsNodeHandle *node_handle, } } +void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle, + struct ID *id, + const char *description) +{ + DEG::OperationKey operation_key( + id, + DEG::DEG_NODE_TYPE_GENERIC_DATABLOCK, + DEG::DEG_OPCODE_GENERIC_DATABLOCK_UPDATE); + DEG::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); + deg_node_handle->builder->add_node_handle_relation(operation_key, + deg_node_handle, + description); +} + void DEG_add_special_eval_flag(struct DepsNodeHandle *node_handle, ID *id, uint32_t flag) -- cgit v1.2.3