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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-24 12:31:24 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-24 13:45:03 +0300
commit547d31c8da1fcb938e91887909c5e2f3b3d180d5 (patch)
tree9add6d1e320972dcd874e83e298dbcf61793a90c /source/blender/depsgraph/intern/depsgraph_build.cc
parent6e3a9b9313a2dcbd5c8967387de36b4ecd312d3e (diff)
Depsgraph: minor renaming and refactor of API for adding evaluation flags.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc31
1 files changed, 11 insertions, 20 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 957ca1a4275..e38cebbf525 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -131,11 +131,11 @@ void DEG_add_object_relation(DepsNodeHandle *handle,
description);
}
-void DEG_add_object_customdata_relation(DepsNodeHandle *handle,
- Object *object,
- eDepsObjectComponentType component,
- uint64_t customdata_mask,
- const char *description)
+void DEG_add_object_relation_with_customdata(DepsNodeHandle *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);
@@ -178,26 +178,17 @@ void DEG_add_bone_relation(DepsNodeHandle *handle,
description);
}
-struct Depsgraph *DEG_get_graph_from_handle(struct DepsNodeHandle *handle)
+void DEG_add_special_eval_flag(struct DepsNodeHandle *handle, ID *id, short flag)
{
DEG::DepsNodeHandle *deg_handle = get_handle(handle);
- DEG::DepsgraphRelationBuilder *relation_builder = deg_handle->builder;
- return reinterpret_cast<Depsgraph *>(relation_builder->getGraph());
+ deg_handle->builder->add_special_eval_flag(id, flag);
}
-void DEG_add_special_eval_flag(Depsgraph *graph, ID *id, short flag)
+struct Depsgraph *DEG_get_graph_from_handle(struct DepsNodeHandle *handle)
{
- DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
- if (graph == NULL) {
- BLI_assert(!"Graph should always be valid");
- return;
- }
- DEG::IDDepsNode *id_node = deg_graph->find_id_node(id);
- if (id_node == NULL) {
- BLI_assert(!"ID should always be valid");
- return;
- }
- id_node->eval_flags |= flag;
+ DEG::DepsNodeHandle *deg_handle = get_handle(handle);
+ DEG::DepsgraphRelationBuilder *relation_builder = deg_handle->builder;
+ return reinterpret_cast<Depsgraph *>(relation_builder->getGraph());
}
/* ******************** */