Blender  V3.3
Functions
depsgraph_build.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "PIL_time_utildefines.h"
#include "DNA_cachefile_types.h"
#include "DNA_collection_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_simulation_types.h"
#include "BKE_collection.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_debug.h"
#include "builder/deg_builder_relations.h"
#include "builder/pipeline_all_objects.h"
#include "builder/pipeline_compositor.h"
#include "builder/pipeline_from_ids.h"
#include "builder/pipeline_render.h"
#include "builder/pipeline_view_layer.h"
#include "intern/debug/deg_debug.h"
#include "intern/node/deg_node.h"
#include "intern/node/deg_node_component.h"
#include "intern/node/deg_node_id.h"
#include "intern/node/deg_node_operation.h"
#include "intern/depsgraph_registry.h"
#include "intern/depsgraph_relation.h"
#include "intern/depsgraph_tag.h"
#include "intern/depsgraph_type.h"

Go to the source code of this file.

Functions

static deg::NodeType deg_build_scene_component_type (eDepsSceneComponentType component)
 
static deg::DepsNodeHandleget_node_handle (DepsNodeHandle *node_handle)
 
void DEG_add_scene_relation (DepsNodeHandle *node_handle, Scene *scene, eDepsSceneComponentType component, const char *description)
 
void DEG_add_object_relation (DepsNodeHandle *node_handle, Object *object, eDepsObjectComponentType component, const char *description)
 
bool DEG_object_has_geometry_component (Object *object)
 
void DEG_add_collection_geometry_relation (DepsNodeHandle *node_handle, Collection *collection, const char *description)
 
void DEG_add_collection_geometry_customdata_mask (DepsNodeHandle *node_handle, Collection *collection, const CustomData_MeshMasks *masks)
 
void DEG_add_simulation_relation (DepsNodeHandle *node_handle, Simulation *simulation, const char *description)
 
void DEG_add_node_tree_output_relation (DepsNodeHandle *node_handle, bNodeTree *node_tree, const char *description)
 
void DEG_add_object_cache_relation (DepsNodeHandle *node_handle, CacheFile *cache_file, eDepsObjectComponentType component, const char *description)
 
void DEG_add_bone_relation (DepsNodeHandle *node_handle, Object *object, const char *bone_name, eDepsObjectComponentType component, const char *description)
 
void DEG_add_object_pointcache_relation (struct DepsNodeHandle *node_handle, struct Object *object, eDepsObjectComponentType component, const char *description)
 
void DEG_add_generic_id_relation (struct DepsNodeHandle *node_handle, struct ID *id, const char *description)
 
void DEG_add_modifier_to_transform_relation (struct DepsNodeHandle *node_handle, const char *description)
 
void DEG_add_special_eval_flag (struct DepsNodeHandle *node_handle, ID *id, uint32_t flag)
 
void DEG_add_customdata_mask (struct DepsNodeHandle *node_handle, struct Object *object, const CustomData_MeshMasks *masks)
 
struct IDDEG_get_id_from_handle (struct DepsNodeHandle *node_handle)
 
struct DepsgraphDEG_get_graph_from_handle (struct DepsNodeHandle *node_handle)
 
void DEG_graph_build_from_view_layer (Depsgraph *graph)
 
void DEG_graph_build_for_all_objects (struct Depsgraph *graph)
 
void DEG_graph_build_for_render_pipeline (Depsgraph *graph)
 
void DEG_graph_build_for_compositor_preview (Depsgraph *graph, bNodeTree *nodetree)
 
void DEG_graph_build_from_ids (Depsgraph *graph, ID **ids, const int num_ids)
 
void DEG_graph_tag_relations_update (Depsgraph *graph)
 
void DEG_graph_relations_update (Depsgraph *graph)
 
void DEG_relations_tag_update (Main *bmain)
 

Detailed Description

Methods for constructing depsgraph.

Definition in file depsgraph_build.cc.

Function Documentation

◆ DEG_add_bone_relation()

void DEG_add_bone_relation ( DepsNodeHandle *  node_handle,
Object object,
const char *  bone_name,
eDepsObjectComponentType  component,
const char *  description 
)

◆ DEG_add_collection_geometry_customdata_mask()

void DEG_add_collection_geometry_customdata_mask ( DepsNodeHandle *  node_handle,
Collection collection,
const CustomData_MeshMasks masks 
)

◆ DEG_add_collection_geometry_relation()

void DEG_add_collection_geometry_relation ( DepsNodeHandle *  node_handle,
Collection collection,
const char *  description 
)

◆ DEG_add_customdata_mask()

void DEG_add_customdata_mask ( struct DepsNodeHandle *  node_handle,
struct Object object,
const CustomData_MeshMasks masks 
)

◆ DEG_add_generic_id_relation()

void DEG_add_generic_id_relation ( struct DepsNodeHandle *  node_handle,
struct ID id,
const char *  description 
)

Adds relation from #DEG_OPCODE_GENERIC_DATABLOCK_UPDATE of a given ID. Is used for such entities as textures and images.

Definition at line 192 of file depsgraph_build.cc.

References blender::deg::DepsgraphRelationBuilder::add_node_handle_relation(), blender::deg::DepsNodeHandle::builder, and get_node_handle().

Referenced by updateDepsgraph().

◆ DEG_add_modifier_to_transform_relation()

void DEG_add_modifier_to_transform_relation ( struct DepsNodeHandle *  node_handle,
const char *  description 
)

Special function which is used from modifiers' updateDepsgraph() callback to indicate that the modifier needs to know transformation of the object which that modifier belongs to. This function will take care of checking which operation is required to have transformation for the modifier, taking into account possible simulation solvers.

Definition at line 202 of file depsgraph_build.cc.

References blender::deg::DepsgraphRelationBuilder::add_modifier_to_transform_relation(), blender::deg::DepsNodeHandle::builder, and get_node_handle().

Referenced by updateDepsgraph().

◆ DEG_add_node_tree_output_relation()

void DEG_add_node_tree_output_relation ( DepsNodeHandle *  node_handle,
bNodeTree node_tree,
const char *  description 
)

◆ DEG_add_object_cache_relation()

void DEG_add_object_cache_relation ( DepsNodeHandle *  node_handle,
CacheFile cache_file,
eDepsObjectComponentType  component,
const char *  description 
)

◆ DEG_add_object_pointcache_relation()

void DEG_add_object_pointcache_relation ( struct DepsNodeHandle *  node_handle,
struct Object object,
eDepsObjectComponentType  component,
const char *  description 
)

◆ DEG_add_object_relation()

void DEG_add_object_relation ( DepsNodeHandle *  node_handle,
Object object,
eDepsObjectComponentType  component,
const char *  description 
)

◆ DEG_add_scene_relation()

void DEG_add_scene_relation ( DepsNodeHandle *  node_handle,
Scene scene,
eDepsSceneComponentType  component,
const char *  description 
)

◆ DEG_add_simulation_relation()

void DEG_add_simulation_relation ( DepsNodeHandle *  node_handle,
Simulation simulation,
const char *  description 
)

◆ DEG_add_special_eval_flag()

void DEG_add_special_eval_flag ( struct DepsNodeHandle *  node_handle,
ID id,
uint32_t  flag 
)

◆ deg_build_scene_component_type()

static deg::NodeType deg_build_scene_component_type ( eDepsSceneComponentType  component)
static

◆ DEG_get_graph_from_handle()

struct Depsgraph* DEG_get_graph_from_handle ( struct DepsNodeHandle *  node_handle)

◆ DEG_get_id_from_handle()

struct ID* DEG_get_id_from_handle ( struct DepsNodeHandle *  node_handle)

◆ DEG_graph_build_for_all_objects()

void DEG_graph_build_for_all_objects ( struct Depsgraph graph)

◆ DEG_graph_build_for_compositor_preview()

void DEG_graph_build_for_compositor_preview ( struct Depsgraph graph,
struct bNodeTree nodetree 
)

Builds minimal dependency graph for compositor preview.

Note that compositor editor might have pinned node tree, which is different from scene's node tree.

Definition at line 257 of file depsgraph_build.cc.

References blender::deg::AbstractBuilderPipeline::build(), and graph.

Referenced by blender::ed::space_node::compo_initjob().

◆ DEG_graph_build_for_render_pipeline()

void DEG_graph_build_for_render_pipeline ( struct Depsgraph graph)

Special version of builder which produces dependency graph suitable for the render pipeline. It will contain sequencer and compositor (if needed) and all their dependencies.

Definition at line 251 of file depsgraph_build.cc.

References blender::deg::AbstractBuilderPipeline::build(), and graph.

Referenced by render_init_depsgraph(), and seq_prefetch_init_depsgraph().

◆ DEG_graph_build_from_ids()

void DEG_graph_build_from_ids ( Depsgraph graph,
ID **  ids,
const int  num_ids 
)

Definition at line 263 of file depsgraph_build.cc.

References blender::deg::AbstractBuilderPipeline::build(), and graph.

Referenced by animviz_depsgraph_build().

◆ DEG_graph_build_from_view_layer()

void DEG_graph_build_from_view_layer ( struct Depsgraph graph)

◆ DEG_graph_relations_update()

void DEG_graph_relations_update ( struct Depsgraph graph)

◆ DEG_graph_tag_relations_update()

void DEG_graph_tag_relations_update ( struct Depsgraph graph)

◆ DEG_object_has_geometry_component()

bool DEG_object_has_geometry_component ( Object object)

◆ DEG_relations_tag_update()

void DEG_relations_tag_update ( struct Main bmain)

Tag all relations in the database for update.

Definition at line 296 of file depsgraph_build.cc.

References DEG_GLOBAL_DEBUG_PRINTF, DEG_graph_tag_relations_update(), depsgraph, and blender::deg::get_all_registered_graphs().

Referenced by add_driver_button_invoke(), add_driver_button_none(), add_hook_object(), animchannels_delete_exec(), apply_objects_internal(), BKE_id_material_append(), BKE_id_material_clear(), BKE_id_material_pop(), BKE_id_material_resize(), BKE_id_materials_copy(), BKE_lib_id_clear_library_data(), BKE_lib_override_library_update(), BKE_libblock_relink_multiple(), BKE_libblock_remap_multiple_locked(), BKE_mask_new(), BKE_object_material_resize(), BKE_pose_rebuild(), BKE_pose_tag_recalc(), brush_draw_apply(), clip_delete_plane_track(), clip_delete_track(), collection_add_exec(), collection_create_exec(), collection_drop_exec(), collection_drop_invoke(), collection_duplicate_exec(), collection_flag_exec(), collection_hierarchy_delete_exec(), collection_instance_exec(), collection_link_exec(), collection_new_exec(), collection_objects_remove_all_exec(), collection_objects_remove_exec(), collection_remove_exec(), collection_unlink_exec(), collection_view_layer_exec(), constraint_add_exec(), constraint_apply_exec(), constraint_copy_exec(), constraint_copy_to_selected_exec(), constraint_delete_exec(), copy_particle_systems_to_object(), copybuffer_append(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), data_transfer_exec(), datalayout_transfer_exec(), deg_tag_after_keyframe_delete(), do_graph_region_driver_buttons(), driverdropper_sample(), drop_world_exec(), duplicate_exec(), ED_action_fcurve_ensure(), ED_armature_join_objects_exec(), ED_curve_join_objects_exec(), ED_curve_updateAnimPaths(), ED_gpencil_join_objects_exec(), ED_id_action_ensure(), ED_mesh_join_objects_exec(), ED_object_add_type_with_obdata(), ED_object_constraint_dependency_tag_update(), ED_object_constraint_dependency_update(), ED_object_editmode_load_free_ex(), ED_object_gpencil_modifier_add(), ED_object_gpencil_modifier_clear(), ED_object_gpencil_modifier_remove(), ED_object_modifier_add(), ED_object_modifier_clear(), ED_object_modifier_convert_psys_to_mesh(), ED_object_modifier_copy_to_object(), ED_object_modifier_link(), ED_object_modifier_remove(), ED_object_shaderfx_add(), ED_object_shaderfx_clear(), ED_object_shaderfx_remove(), ED_render_engine_changed(), ED_rigidbody_constraint_add(), ED_rigidbody_constraint_remove(), ED_rigidbody_object_remove(), ED_scene_sequencer_add(), ED_scene_view_layer_delete(), ED_text_to_object(), ED_wpaint_ensure_data(), edbm_separate_exec(), eyedropper_add_material(), DocumentImporter::finish(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), geometry_extract_apply(), geometry_node_tree_copy_assign_exec(), blender::io::obj::geometry_to_blender_objects(), gpencil_bake_grease_pencil_animation_exec(), gpencil_brush_reset_all_exec(), gpencil_convert_old_files_exec(), gpencil_layer_to_curve(), gpencil_object_modifier_remove(), gpencil_object_vgroup_calc_from_armature(), gpencil_stroke_separate_exec(), graph_driver_delete_invalid_exec(), graph_driver_vars_paste_exec(), image_to_gpencil_exec(), blender::io::usd::import_endjob(), import_endjob(), blender::io::usd::import_startjob(), blender::io::stl::importer_main(), libblock_remap_foreach_idpair_cb(), make_links_data_exec(), make_links_scene_exec(), make_single_user_exec(), modifier_apply_exec_ex(), modifier_copy_to_selected_exec(), move_to_collection_exec(), new_particle_settings_exec(), new_particle_target_exec(), nlaedit_add_actionclip_exec(), nlaedit_add_tracks_exec(), nlaedit_apply_scale_exec(), nlaedit_delete_exec(), nlaedit_delete_tracks_exec(), nlaedit_duplicate_exec(), nlaedit_make_single_user_exec(), blender::ed::space_node::node_add_collection_exec(), blender::ed::space_node::node_add_file_exec(), blender::ed::space_node::node_add_group_exec(), blender::ed::space_node::node_add_mask_exec(), blender::ed::space_node::node_add_object_exec(), blender::ed::space_node::node_clipboard_paste_exec(), blender::ed::space_node::node_group_make_exec(), nodeAddNode(), nodeRemoveNode(), object_add_named_exec(), object_add_or_copy_particle_system(), object_constraint_copy_exec(), object_constraints_clear_exec(), object_convert_exec(), object_delete_exec(), object_duplicates_make_real_exec(), object_remove_particle_system(), object_shaderfx_remove(), object_track_clear_exec(), objects_add_active_exec(), objects_remove_active_exec(), open_exec(), outliner_animdata_operation_exec(), outliner_collection_set_flag_recursive_fn(), outliner_delete_exec(), outliner_id_remap_exec(), outliner_object_set_flag_recursive_fn(), outliner_orphans_purge_exec(), output_toggle_exec(), paint_mask_slice_exec(), parent_clear_exec(), parent_clear_invoke(), parent_drop_set_parents(), parent_noinv_set_exec(), parent_set_exec(), paste_driver_button_exec(), pose_constraint_copy_exec(), pose_constraints_clear_exec(), pose_grab_with_ik_clear(), pyrna_struct_driver_add(), pyrna_struct_driver_remove(), remove_driver_button_exec(), remove_particle_target_exec(), rigidbody_world_add_exec(), rigidbody_world_remove_exec(), rna_property_update(), rule_del_exec(), scene_drop_invoke(), separate_armature_exec(), separate_exec(), sequencer_add_movie_strip_exec(), sequencer_add_scene_strip_exec(), sequencer_add_scene_strip_new_exec(), sequencer_add_sound_strip_exec(), sequencer_change_scene_exec(), sequencer_delete_exec(), sequencer_paste_exec(), shape_key_add_exec(), shape_key_remove_exec(), skin_armature_create_exec(), state_del_exec(), blender::ed::curves::surface_set::surface_set_exec(), template_id_cb(), trace_end_job(), track_set_exec(), transform_autoik_update(), tree_element_camera_activate(), type_toggle_exec(), ui_but_anim_expression_create(), ui_but_anim_expression_set(), unlink_collection_fn(), unlink_object_fn(), update_deg_with_temporary_ik(), vertex_group_add_exec(), vertex_group_copy_exec(), vertex_group_copy_to_selected_exec(), vertex_group_mirror_exec(), vertex_group_remove_exec(), vertex_parent_set_exec(), view3d_collection_drop_copy_external_asset(), view3d_ob_drop_copy_external_asset(), view_layer_add_aov_exec(), view_layer_add_exec(), view_layer_add_lightgroup_exec(), view_layer_add_used_lightgroups_exec(), view_layer_remove_aov_exec(), view_layer_remove_lightgroup_exec(), view_layer_remove_unused_lightgroups_exec(), weight_from_bones_exec(), WM_lib_reload(), wm_lib_relocate_exec_do(), and wm_link_append_exec().

◆ get_node_handle()

static deg::DepsNodeHandle* get_node_handle ( DepsNodeHandle *  node_handle)
static