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:
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index b1271c39851..ae830da1252 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -33,6 +33,7 @@
#include "MEM_guardedalloc.h"
extern "C" {
+#include "DNA_cachefile_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@@ -89,6 +90,7 @@ static DEG::eDepsNode_Type deg_build_object_component_type(
case DEG_OB_COMP_BONE: return DEG::DEPSNODE_TYPE_BONE;
case DEG_OB_COMP_EVAL_PARTICLES: return DEG::DEPSNODE_TYPE_EVAL_PARTICLES;
case DEG_OB_COMP_SHADING: return DEG::DEPSNODE_TYPE_SHADING;
+ case DEG_OB_COMP_CACHE: return DEG::DEPSNODE_TYPE_CACHE;
}
return DEG::DEPSNODE_TYPE_UNDEFINED;
}
@@ -126,6 +128,20 @@ void DEG_add_object_relation(DepsNodeHandle *handle,
description);
}
+void DEG_add_object_cache_relation(DepsNodeHandle *handle,
+ CacheFile *cache_file,
+ eDepsObjectComponentType component,
+ const char *description)
+{
+ DEG::eDepsNode_Type type = deg_build_object_component_type(component);
+ DEG::ComponentKey comp_key(&cache_file->id, type);
+ DEG::DepsNodeHandle *deg_handle = get_handle(handle);
+ deg_handle->builder->add_node_handle_relation(comp_key,
+ deg_handle,
+ DEG::DEPSREL_TYPE_CACHE,
+ description);
+}
+
void DEG_add_bone_relation(DepsNodeHandle *handle,
Object *ob,
const char *bone_name,