Blender V5.0
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
10
11#pragma once
12
13#include "BLI_span.hh"
14
15/* ************************************************* */
16
17/* Dependency Graph */
18struct Depsgraph;
19
20/* ------------------------------------------------ */
21
22struct CacheFile;
23struct Collection;
25struct ID;
26struct Main;
27struct Object;
28struct Scene;
29struct bNodeTree;
30
31/* Graph Building -------------------------------- */
32
34void DEG_graph_build_from_view_layer(Depsgraph *graph);
35
39void DEG_graph_build_for_all_objects(Depsgraph *graph);
40
45void DEG_graph_build_for_render_pipeline(Depsgraph *graph);
46
53void DEG_graph_build_for_compositor_preview(Depsgraph *graph, bNodeTree *nodetree);
54
58void DEG_graph_build_from_collection(Depsgraph *graph, Collection *collection);
59
63void DEG_graph_build_from_ids(Depsgraph *graph, blender::Span<ID *> ids);
64
66void DEG_graph_tag_relations_update(Depsgraph *graph);
67
69void DEG_graph_relations_update(Depsgraph *graph);
70
73
74/* Add Dependencies ----------------------------- */
75
82struct DepsNodeHandle;
83
85 /* Parameters Component - Default when nothing else fits
86 * (i.e. just SDNA property setting). */
88 /* Animation Component
89 * TODO(sergey): merge in with parameters? */
91 /* Sequencer Component (Scene Only). */
93};
94
96 /* Used in query API, to denote which component caller is interested in. */
98
99 /* Parameters Component - Default when nothing else fits
100 * (i.e. just SDNA property setting). */
102 /* Animation Component.
103 *
104 * TODO(sergey): merge in with parameters? */
106 /* Transform Component (Parenting/Constraints) */
108 /* Geometry Component (#Mesh / #Curves, etc.). */
110
111 /* Evaluation-Related Outer Types (with Sub-data) */
112
113 /* Pose Component - Owner/Container of Bones Eval */
115 /* Bone Component - Child/Sub-component of Pose */
117
118 /* Material Shading Component */
120 /* Cache Component */
122};
123
124void DEG_add_scene_relation(DepsNodeHandle *node_handle,
125 Scene *scene,
126 eDepsSceneComponentType component,
127 const char *description);
128void DEG_add_scene_camera_relation(DepsNodeHandle *node_handle,
129 Scene *scene,
130 eDepsObjectComponentType component,
131 const char *description);
132void DEG_add_object_relation(DepsNodeHandle *node_handle,
133 Object *object,
134 eDepsObjectComponentType component,
135 const char *description);
136void DEG_add_collection_geometry_relation(DepsNodeHandle *node_handle,
137 Collection *collection,
138 const char *description);
139void DEG_add_collection_geometry_customdata_mask(DepsNodeHandle *node_handle,
140 Collection *collection,
141 const CustomData_MeshMasks *masks);
142void DEG_add_node_tree_output_relation(DepsNodeHandle *node_handle,
143 bNodeTree *node_tree,
144 const char *description);
145void DEG_add_bone_relation(DepsNodeHandle *handle,
146 Object *object,
147 const char *bone_name,
148 eDepsObjectComponentType component,
149 const char *description);
150void DEG_add_object_cache_relation(DepsNodeHandle *handle,
151 CacheFile *cache_file,
152 eDepsObjectComponentType component,
153 const char *description);
158void DEG_add_generic_id_relation(DepsNodeHandle *node_handle, ID *id, const char *description);
159
167void DEG_add_depends_on_transform_relation(DepsNodeHandle *node_handle, const char *description);
168
173void DEG_add_object_pointcache_relation(DepsNodeHandle *node_handle,
174 Object *object,
175 eDepsObjectComponentType component,
176 const char *description);
177
178void DEG_add_special_eval_flag(DepsNodeHandle *handle, ID *id, uint32_t flag);
179void DEG_add_customdata_mask(DepsNodeHandle *handle,
180 Object *object,
181 const CustomData_MeshMasks *masks);
182
183ID *DEG_get_id_from_handle(DepsNodeHandle *node_handle);
184Depsgraph *DEG_get_graph_from_handle(DepsNodeHandle *node_handle);
185
187
188/* ************************************************ */
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)
Definition DNA_ID.h:414
uint8_t flag
Definition wm_window.cc:145