diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-03 18:09:45 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-03 18:29:06 +0300 |
commit | bb16167fd8727a330a97f591398ac0981c76a562 (patch) | |
tree | 3f19f8097a795242f254a3263bbe84ffb250c774 /source/blender/depsgraph/intern/depsgraph_build.cc | |
parent | fadad895b2f44044b829e7ffe83174d8ecd8a487 (diff) |
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
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build.cc | 25 |
1 files changed, 8 insertions, 17 deletions
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); |