From bb16167fd8727a330a97f591398ac0981c76a562 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Mon, 3 Dec 2018 18:09:45 +0300 Subject: Depsgraph: completely move customdata_mask to the ID node. Move all mask-related fields from Object and OperationDepsNode to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY if the mask changes after DEG rebuild. Update DEG API and all code that uses it. This fixes "source mesh data is not ready" errors from Data Transfer modifier when parameters are changed in the UI after the recent mesh_get_eval_final fix. Reviewers: sergey Differential Revision: https://developer.blender.org/D4025 --- source/blender/depsgraph/intern/depsgraph_build.cc | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc') diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index d56c47a0d2a..408c6abb0c9 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -130,23 +130,6 @@ void DEG_add_object_relation(DepsNodeHandle *node_handle, description); } -void DEG_add_object_relation_with_customdata(DepsNodeHandle *node_handle, - Object *object, - eDepsObjectComponentType component, - uint64_t customdata_mask, - const char *description) -{ - DEG::eDepsNode_Type type = deg_build_object_component_type(component); - DEG::ComponentKey comp_key(&object->id, type); - DEG::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); - deg_node_handle->builder->add_node_handle_relation(comp_key, - deg_node_handle, - description); - if (object->type == OB_MESH) { - deg_node_handle->builder->add_customdata_mask(comp_key, customdata_mask); - } -} - void DEG_add_object_cache_relation(DepsNodeHandle *node_handle, CacheFile *cache_file, eDepsObjectComponentType component, @@ -210,6 +193,14 @@ void DEG_add_special_eval_flag(struct DepsNodeHandle *node_handle, deg_node_handle->builder->add_special_eval_flag(id, flag); } +void DEG_add_customdata_mask(struct DepsNodeHandle *node_handle, + struct Object *object, + uint64_t mask) +{ + DEG::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); + deg_node_handle->builder->add_customdata_mask(object, mask); +} + struct ID *DEG_get_id_from_handle(struct DepsNodeHandle *node_handle) { DEG::DepsNodeHandle *deg_handle = get_node_handle(node_handle); -- cgit v1.2.3