Blender V4.3
DEG_depsgraph_build.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2013 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11#pragma once
12
13#include "BLI_span.hh"
14#include "BLI_sys_types.h"
15
16/* ************************************************* */
17
18/* Dependency Graph */
19struct Depsgraph;
20
21/* ------------------------------------------------ */
22
23struct CacheFile;
24struct Collection;
26struct ID;
27struct Main;
28struct Object;
29struct Scene;
30struct bNodeTree;
31
32/* Graph Building -------------------------------- */
33
35void DEG_graph_build_from_view_layer(Depsgraph *graph);
36
40void DEG_graph_build_for_all_objects(Depsgraph *graph);
41
46void DEG_graph_build_for_render_pipeline(Depsgraph *graph);
47
54void DEG_graph_build_for_compositor_preview(Depsgraph *graph, bNodeTree *nodetree);
55
59void DEG_graph_build_from_collection(Depsgraph *graph, Collection *collection);
60
64void DEG_graph_build_from_ids(Depsgraph *graph, blender::Span<ID *> ids);
65
67void DEG_graph_tag_relations_update(Depsgraph *graph);
68
70void DEG_graph_relations_update(Depsgraph *graph);
71
74
75/* Add Dependencies ----------------------------- */
76
83struct DepsNodeHandle;
84
86 /* Parameters Component - Default when nothing else fits
87 * (i.e. just SDNA property setting). */
89 /* Animation Component
90 * TODO(sergey): merge in with parameters? */
92 /* Sequencer Component (Scene Only). */
94};
95
97 /* Used in query API, to denote which component caller is interested in. */
99
100 /* Parameters Component - Default when nothing else fits
101 * (i.e. just SDNA property setting). */
103 /* Animation Component.
104 *
105 * TODO(sergey): merge in with parameters? */
107 /* Transform Component (Parenting/Constraints) */
109 /* Geometry Component (#Mesh / #Curves, etc.). */
111
112 /* Evaluation-Related Outer Types (with Sub-data) */
113
114 /* Pose Component - Owner/Container of Bones Eval */
116 /* Bone Component - Child/Sub-component of Pose */
118
119 /* Material Shading Component */
121 /* Cache Component */
123};
124
125void DEG_add_scene_relation(DepsNodeHandle *node_handle,
126 Scene *scene,
127 eDepsSceneComponentType component,
128 const char *description);
129void DEG_add_scene_camera_relation(DepsNodeHandle *node_handle,
130 Scene *scene,
131 eDepsObjectComponentType component,
132 const char *description);
133void DEG_add_object_relation(DepsNodeHandle *node_handle,
134 Object *object,
135 eDepsObjectComponentType component,
136 const char *description);
137void DEG_add_collection_geometry_relation(DepsNodeHandle *node_handle,
138 Collection *collection,
139 const char *description);
140void DEG_add_collection_geometry_customdata_mask(DepsNodeHandle *node_handle,
141 Collection *collection,
142 const CustomData_MeshMasks *masks);
143void DEG_add_node_tree_output_relation(DepsNodeHandle *node_handle,
145 const char *description);
146void DEG_add_bone_relation(DepsNodeHandle *handle,
147 Object *object,
148 const char *bone_name,
149 eDepsObjectComponentType component,
150 const char *description);
151void DEG_add_object_cache_relation(DepsNodeHandle *handle,
152 CacheFile *cache_file,
153 eDepsObjectComponentType component,
154 const char *description);
159void DEG_add_generic_id_relation(DepsNodeHandle *node_handle, ID *id, const char *description);
160
168void DEG_add_depends_on_transform_relation(DepsNodeHandle *node_handle, const char *description);
169
174void DEG_add_object_pointcache_relation(DepsNodeHandle *node_handle,
175 Object *object,
176 eDepsObjectComponentType component,
177 const char *description);
178
179void DEG_add_special_eval_flag(DepsNodeHandle *handle, ID *id, uint32_t flag);
180void DEG_add_customdata_mask(DepsNodeHandle *handle,
181 Object *object,
182 const CustomData_MeshMasks *masks);
183
184ID *DEG_get_id_from_handle(DepsNodeHandle *node_handle);
185Depsgraph *DEG_get_graph_from_handle(DepsNodeHandle *node_handle);
186
188
189/* ************************************************ */
void DEG_add_scene_camera_relation(DepsNodeHandle *node_handle, Scene *scene, eDepsObjectComponentType component, const char *description)
void DEG_add_generic_id_relation(DepsNodeHandle *node_handle, ID *id, const char *description)
ID * DEG_get_id_from_handle(DepsNodeHandle *node_handle)
void DEG_add_object_cache_relation(DepsNodeHandle *handle, CacheFile *cache_file, eDepsObjectComponentType component, const char *description)
void DEG_relations_tag_update(Main *bmain)
void DEG_graph_build_for_compositor_preview(Depsgraph *graph, bNodeTree *nodetree)
void DEG_add_depends_on_transform_relation(DepsNodeHandle *node_handle, const char *description)
eDepsSceneComponentType
@ DEG_SCENE_COMP_ANIMATION
@ DEG_SCENE_COMP_PARAMETERS
@ DEG_SCENE_COMP_SEQUENCER
void DEG_graph_build_from_collection(Depsgraph *graph, Collection *collection)
void DEG_add_customdata_mask(DepsNodeHandle *handle, Object *object, const CustomData_MeshMasks *masks)
void DEG_add_collection_geometry_relation(DepsNodeHandle *node_handle, Collection *collection, const char *description)
void DEG_add_bone_relation(DepsNodeHandle *handle, Object *object, const char *bone_name, eDepsObjectComponentType component, const char *description)
void DEG_graph_build_from_ids(Depsgraph *graph, blender::Span< ID * > ids)
void DEG_graph_tag_relations_update(Depsgraph *graph)
void DEG_add_scene_relation(DepsNodeHandle *node_handle, Scene *scene, eDepsSceneComponentType component, const char *description)
void DEG_add_object_pointcache_relation(DepsNodeHandle *node_handle, Object *object, eDepsObjectComponentType component, const char *description)
bool DEG_object_has_geometry_component(Object *object)
void DEG_add_object_relation(DepsNodeHandle *node_handle, Object *object, eDepsObjectComponentType component, const char *description)
void DEG_add_special_eval_flag(DepsNodeHandle *handle, ID *id, uint32_t flag)
void DEG_graph_build_for_all_objects(Depsgraph *graph)
eDepsObjectComponentType
@ DEG_OB_COMP_ANY
@ DEG_OB_COMP_EVAL_POSE
@ DEG_OB_COMP_GEOMETRY
@ DEG_OB_COMP_ANIMATION
@ DEG_OB_COMP_TRANSFORM
@ DEG_OB_COMP_SHADING
@ DEG_OB_COMP_PARAMETERS
@ DEG_OB_COMP_CACHE
@ DEG_OB_COMP_BONE
void DEG_graph_build_for_render_pipeline(Depsgraph *graph)
Depsgraph * DEG_get_graph_from_handle(DepsNodeHandle *node_handle)
void DEG_graph_relations_update(Depsgraph *graph)
void DEG_add_collection_geometry_customdata_mask(DepsNodeHandle *node_handle, Collection *collection, const CustomData_MeshMasks *masks)
void DEG_graph_build_from_view_layer(Depsgraph *graph)
void DEG_add_node_tree_output_relation(DepsNodeHandle *node_handle, bNodeTree *node_tree, const char *description)
unsigned int uint32_t
Definition stdint.h:80
Definition DNA_ID.h:413
uint8_t flag
Definition wm_window.cc:138