Blender  V2.93
Classes | Macros | Typedefs | Enumerations | Functions
DEG_depsgraph_query.h File Reference
#include "BLI_iterator.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DNA_object_types.h"

Go to the source code of this file.

Classes

struct  DEGObjectIterData
 
struct  DEGIDIterData
 

Macros

#define DEG_OBJECT_ITER_BEGIN(graph_, instance_, flag_)
 
#define DEG_OBJECT_ITER_END
 
#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN(graph_, instance_)
 
#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END   DEG_OBJECT_ITER_END
 

Typedefs

typedef struct DEGObjectIterData DEGObjectIterData
 
typedef struct DEGIDIterData DEGIDIterData
 
typedef void(* DEGForeachIDCallback) (ID *id, void *user_data)
 
typedef void(* DEGForeachIDComponentCallback) (ID *id, eDepsObjectComponentType component, void *user_data)
 

Enumerations

enum  {
  DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY = (1 << 0) , DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY = (1 << 1) , DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET = (1 << 2) , DEG_ITER_OBJECT_FLAG_VISIBLE = (1 << 3) ,
  DEG_ITER_OBJECT_FLAG_DUPLI = (1 << 4)
}
 
enum  { DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS = (1 << 0) }
 

Functions

struct SceneDEG_get_input_scene (const Depsgraph *graph)
 
struct ViewLayerDEG_get_input_view_layer (const Depsgraph *graph)
 
struct MainDEG_get_bmain (const Depsgraph *graph)
 
eEvaluationMode DEG_get_mode (const Depsgraph *graph)
 
float DEG_get_ctime (const Depsgraph *graph)
 
bool DEG_id_type_updated (const struct Depsgraph *depsgraph, short id_type)
 
bool DEG_id_type_any_updated (const struct Depsgraph *depsgraph)
 
bool DEG_id_type_any_exists (const struct Depsgraph *depsgraph, short id_type)
 
uint32_t DEG_get_eval_flags_for_id (const struct Depsgraph *graph, struct ID *id)
 
void DEG_get_customdata_mask_for_object (const struct Depsgraph *graph, struct Object *object, struct CustomData_MeshMasks *r_mask)
 
struct SceneDEG_get_evaluated_scene (const struct Depsgraph *graph)
 
struct ViewLayerDEG_get_evaluated_view_layer (const struct Depsgraph *graph)
 
struct ObjectDEG_get_evaluated_object (const struct Depsgraph *depsgraph, struct Object *object)
 
struct IDDEG_get_evaluated_id (const struct Depsgraph *depsgraph, struct ID *id)
 
void DEG_get_evaluated_rna_pointer (const struct Depsgraph *depsgraph, struct PointerRNA *ptr, struct PointerRNA *r_ptr_eval)
 
struct ObjectDEG_get_original_object (struct Object *object)
 
struct IDDEG_get_original_id (struct ID *id)
 
bool DEG_is_original_id (const struct ID *id)
 
bool DEG_is_original_object (const struct Object *object)
 
bool DEG_is_evaluated_id (const struct ID *id)
 
bool DEG_is_evaluated_object (const struct Object *object)
 
bool DEG_is_fully_evaluated (const struct Depsgraph *depsgraph)
 
void DEG_iterator_objects_begin (struct BLI_Iterator *iter, DEGObjectIterData *data)
 
void DEG_iterator_objects_next (struct BLI_Iterator *iter)
 
void DEG_iterator_objects_end (struct BLI_Iterator *iter)
 
void DEG_iterator_ids_begin (struct BLI_Iterator *iter, DEGIDIterData *data)
 
void DEG_iterator_ids_next (struct BLI_Iterator *iter)
 
void DEG_iterator_ids_end (struct BLI_Iterator *iter)
 
void DEG_foreach_ancestor_ID (const Depsgraph *depsgraph, const ID *id, DEGForeachIDCallback callback, void *user_data)
 
void DEG_foreach_dependent_ID (const Depsgraph *depsgraph, const ID *id, DEGForeachIDCallback callback, void *user_data)
 
void DEG_foreach_dependent_ID_component (const Depsgraph *depsgraph, const ID *id, eDepsObjectComponentType source_component_type, int flags, DEGForeachIDComponentCallback callback, void *user_data)
 
void DEG_foreach_ID (const Depsgraph *depsgraph, DEGForeachIDCallback callback, void *user_data)
 

Detailed Description

Public API for Querying Depsgraph.

Definition in file DEG_depsgraph_query.h.

Macro Definition Documentation

◆ DEG_OBJECT_ITER_BEGIN

#define DEG_OBJECT_ITER_BEGIN (   graph_,
  instance_,
  flag_ 
)
Value:
{ \
DEGObjectIterData data_ = { \
graph_, \
flag_, \
}; \
&data_, \
Object *, \
instance_)
#define ITER_BEGIN(callback_begin, callback_next, callback_end, _data_in, _type, _instance)
Definition: BLI_iterator.h:44
void DEG_iterator_objects_next(struct BLI_Iterator *iter)
void DEG_iterator_objects_end(struct BLI_Iterator *iter)
void DEG_iterator_objects_begin(struct BLI_Iterator *iter, DEGObjectIterData *data)
T * data_

Note: Be careful with DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY objects. Although they are available they have no overrides (collection_properties) and will crash if you try to access it.

Definition at line 187 of file DEG_depsgraph_query.h.

◆ DEG_OBJECT_ITER_END

#define DEG_OBJECT_ITER_END
Value:
} \
((void)0)
#define ITER_END
Definition: BLI_iterator.h:57

Definition at line 201 of file DEG_depsgraph_query.h.

◆ DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN

#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN (   graph_,
  instance_ 
)
Value:
instance_, \
#define DEG_OBJECT_ITER_BEGIN(graph_, instance_, flag_)
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_VISIBLE
@ DEG_ITER_OBJECT_FLAG_DUPLI
@ DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET

Depsgraph objects iterator for draw manager and final render

Definition at line 209 of file DEG_depsgraph_query.h.

◆ DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END

#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END   DEG_OBJECT_ITER_END

Definition at line 216 of file DEG_depsgraph_query.h.

Typedef Documentation

◆ DEGForeachIDCallback

typedef void(* DEGForeachIDCallback) (ID *id, void *user_data)

Definition at line 234 of file DEG_depsgraph_query.h.

◆ DEGForeachIDComponentCallback

typedef void(* DEGForeachIDComponentCallback) (ID *id, eDepsObjectComponentType component, void *user_data)

Definition at line 235 of file DEG_depsgraph_query.h.

◆ DEGIDIterData

typedef struct DEGIDIterData DEGIDIterData

◆ DEGObjectIterData

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY 
DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY 
DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET 
DEG_ITER_OBJECT_FLAG_VISIBLE 
DEG_ITER_OBJECT_FLAG_DUPLI 

Definition at line 132 of file DEG_depsgraph_query.h.

◆ anonymous enum

anonymous enum
Enumerator
DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS 

Definition at line 253 of file DEG_depsgraph_query.h.

Function Documentation

◆ DEG_foreach_ancestor_ID()

void DEG_foreach_ancestor_ID ( const Depsgraph depsgraph,
const ID id,
DEGForeachIDCallback  callback,
void *  user_data 
)

Definition at line 288 of file depsgraph_query_foreach.cc.

References callback, depsgraph, and user_data.

◆ DEG_foreach_dependent_ID()

void DEG_foreach_dependent_ID ( const Depsgraph depsgraph,
const ID id,
DEGForeachIDCallback  callback,
void *  user_data 
)

Definition at line 269 of file depsgraph_query_foreach.cc.

References callback, depsgraph, and user_data.

◆ DEG_foreach_dependent_ID_component()

void DEG_foreach_dependent_ID_component ( const Depsgraph depsgraph,
const ID id,
eDepsObjectComponentType  source_component_type,
int  flags,
DEGForeachIDComponentCallback  callback,
void *  user_data 
)

Definition at line 277 of file depsgraph_query_foreach.cc.

References callback, depsgraph, and user_data.

Referenced by flush_trans_object_base_deps_flag().

◆ DEG_foreach_ID()

void DEG_foreach_ID ( const Depsgraph depsgraph,
DEGForeachIDCallback  callback,
void *  user_data 
)

Definition at line 296 of file depsgraph_query_foreach.cc.

References callback, depsgraph, and user_data.

◆ DEG_get_bmain()

struct Main* DEG_get_bmain ( const Depsgraph graph)

◆ DEG_get_ctime()

float DEG_get_ctime ( const Depsgraph graph)

◆ DEG_get_customdata_mask_for_object()

void DEG_get_customdata_mask_for_object ( const struct Depsgraph graph,
struct Object object,
struct CustomData_MeshMasks r_mask 
)

Referenced by object_get_datamask().

◆ DEG_get_eval_flags_for_id()

uint32_t DEG_get_eval_flags_for_id ( const struct Depsgraph graph,
struct ID id 
)

◆ DEG_get_evaluated_id()

struct ID* DEG_get_evaluated_id ( const struct Depsgraph depsgraph,
struct ID id 
)

◆ DEG_get_evaluated_object()

struct Object* DEG_get_evaluated_object ( const struct Depsgraph depsgraph,
struct Object object 
)

Referenced by add_hook_object(), add_verts_to_dgroups(), animviz_calc_motionpaths(), apply_armature_pose2bones_exec(), apply_objects_internal(), axis_set_view(), bake(), bakeModifier(), BKE_camera_params_from_view3d(), BKE_camera_view_frame_fit_to_coords(), BKE_crazyspace_get_mapped_editverts(), BKE_gpencil_convert_mesh(), BKE_gpencil_layer_transform_matrix_get(), BKE_gpencil_update_layer_transforms(), BKE_mesh_to_curve(), BKE_mesh_to_pointcloud(), BKE_modifier_get_evaluated(), BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_multires_create_mesh(), BKE_object_workob_calc_parent(), BKE_pointcloud_to_mesh(), BKE_sculpt_object_pbvh_ensure(), BKE_sculpt_update_object_for_edit(), bpy_bmesh_from_object(), bvh_get_mesh(), crazyspace_init_object_for_eval(), curve_from_curve_object(), curve_from_font_object(), data_transfer_exec(), datalayout_transfer_exec(), disconnect_hair(), do_render_full_pipeline(), DRW_draw_select_id(), DRW_select_buffer_context_offset_for_object_elem(), dt_layers_select_src_itemf(), dynamicpaint_bake_exec(), ED_draw_object_facemap(), ED_gpencil_data_get_active_evaluated(), ED_mesh_pick_face_vert(), ED_mesh_pick_vert(), ED_mesh_shapes_join_objects_exec(), ED_object_data_xform_container_update_all(), ED_object_modifier_apply(), ED_object_parent_set(), ED_object_particle_edit_mode_enter_ex(), ED_object_xform_skip_child_container_update_all(), ED_view3d_camera_lock_init_ex(), ED_view3d_camera_lock_sync(), ED_view3d_camera_to_view_selected(), ED_view3d_depth_override(), ED_view3d_draw_offscreen_imbuf(), ED_view3d_draw_offscreen_imbuf_simple(), ED_view3d_persp_switch_from_camera(), ED_view3d_radius_to_dist(), ED_view3d_smooth_view_ex(), ED_view3d_to_object(), EEVEE_render_modules_init(), EEVEE_render_view_sync(), FRS_do_stroke_rendering(), get_data_source(), gizmo_preselect_edgering_test_select(), gpencil_generate_weights_exec(), gpencil_primitive_init(), GPENCIL_render_init(), GPENCIL_render_to_image(), gpencil_session_initdata(), ignore_parent_tx(), Freestyle::BlenderFileLoader::insertShapeNode(), iter_snap_objects(), knifeproject_poly_from_object(), lineart_geometry_object_load(), lineart_gpencil_generate(), make_duplis_font(), make_object_duplilist_real(), match_texture_space_exec(), meshobject_foreachScreenVert(), modifier_apply_create_mesh_for_modifier(), modifier_apply_obdata(), modifier_skin_armature_create(), move_cursor(), moveCloserToDistanceFromPlane(), multires_mark_as_modified(), multires_reshape_create_subdiv(), multiresModifier_reshapeFromObject(), object_convert_exec(), object_data_convert_curve_to_mesh(), object_force_modifier_update_for_bind(), object_origin_set_exec(), object_preview_render(), ObjectToTransData(), OVERLAY_camera_cache_populate(), OVERLAY_edit_uv_cache_init(), OVERLAY_grid_init(), paint_sample_color(), paint_weight_gradient_exec(), paintface_flush_flags(), particle_intersect_mesh(), PE_create_particle_edit(), PE_create_shape_tree(), pose_clear_transform_generic_exec(), pose_foreachScreenBone(), proj_paint_state_mesh_eval_init(), proj_paint_state_viewport_init(), psys_eval_get(), remap_hair_emitter(), renderresult_stampinfo(), rigidbody_objects_calc_mass_exec(), ringsel_find_edge(), seq_render_scene_strip(), set_plane_exec(), shrinkwrapModifier_deform(), snap_curs_to_sel_ex(), snap_selected_to_location(), text_update_edited(), uv_select_tag_update_for_object(), uv_shortest_path_pick_ex(), validate_object_select_id(), vgroup_fix(), view3d_camera_border(), view3d_viewmatrix_set(), view_lock_to_active_exec(), visual_transform_apply_exec(), vpaint_proj_dm_map_cosnos_init(), vpaint_proj_dm_map_cosnos_update(), workbench_render(), and workbench_render_matrices_init().

◆ DEG_get_evaluated_rna_pointer()

void DEG_get_evaluated_rna_pointer ( const struct Depsgraph depsgraph,
struct PointerRNA ptr,
struct PointerRNA r_ptr_eval 
)

◆ DEG_get_evaluated_scene()

struct Scene* DEG_get_evaluated_scene ( const struct Depsgraph graph)

Referenced by action_preview_render(), add_hook_object(), add_verts_to_dgroups(), bakeModifier(), BKE_cachefile_filepath_get(), BKE_camera_view_frame_fit_to_coords(), BKE_crazyspace_get_mapped_editverts(), BKE_effectors_create(), BKE_mesh_to_curve(), BKE_mesh_to_pointcloud(), BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_multires_create_mesh(), BKE_scene_update_sound(), bpy_bmesh_from_object(), C_BVHTree_FromObject(), blender::io::alembic::ABCGenericMeshWriter::create_alembic_objects(), data_transfer_exec(), datalayout_transfer_exec(), deformVerts(), deformVertsEM(), DEG_iterator_objects_begin(), displaceModifier_do(), blender::io::alembic::ABCHairWriter::do_write(), blender::io::alembic::ABCPointsWriter::do_write(), blender::io::usd::USDCameraWriter::do_write(), DRW_custom_pipeline(), drw_draw_depth_loop_impl(), DRW_draw_render_loop(), DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), DRW_draw_select_id(), DRW_draw_select_loop(), DRW_draw_view(), DRW_render_gpencil(), DRW_render_set_time(), DRW_render_to_image(), dt_layers_select_src_itemf(), dynamicpaint_bake_exec(), ED_mesh_pick_face_vert(), ED_mesh_pick_vert(), ED_mesh_shapes_join_objects_exec(), ED_screen_animation_play(), ED_view3d_depth_override(), EEVEE_bloom_init(), eevee_cache_finish(), EEVEE_depth_of_field_init(), eevee_lightbake_cache_create(), eevee_lightbake_create_resources(), eevee_lightbake_gather_probes(), eevee_lightbake_render_grid_sample(), eevee_lightbake_render_probe_sample(), eevee_lightbake_render_world_sample(), EEVEE_lightprobes_cache_finish(), EEVEE_lightprobes_cache_init(), EEVEE_lightprobes_init(), EEVEE_lightprobes_refresh(), EEVEE_lookdev_cache_init(), EEVEE_occlusion_init(), EEVEE_render_cache(), EEVEE_render_init(), eevee_render_to_image(), EEVEE_screen_raytrace_init(), EEVEE_shadows_init(), EEVEE_subsurface_cache_init(), EEVEE_temporal_sampling_init(), EEVEE_volumes_init(), force_evaluation_if_constraint_disabled(), FRS_do_stroke_rendering(), generateStrokes(), GPENCIL_render_init(), ignore_parent_tx(), mesh_new_from_mesh_object_with_layers(), meshobject_foreachScreenVert(), MOD_lineart_compute_feature_lines(), modifier_apply_create_mesh_for_modifier(), modifier_skin_armature_create(), modifyMesh(), moveCloserToDistanceFromPlane(), multires_as_mesh(), multires_ccg_settings_init(), multires_reshape_context_create_from_base_mesh(), multires_reshape_context_create_from_object(), multires_reshape_create_subdiv(), multiresModifier_reshapeFromObject(), object_force_modifier_update_for_bind(), object_preview_render(), paint_weight_gradient_exec(), particle_intersect_mesh(), proj_paint_state_mesh_eval_init(), RE_point_density_cache(), RE_point_density_minmax(), render_init_depsgraph(), screen_animation_step_invoke(), screen_opengl_render_anim_init(), seq_prefetch_init_depsgraph(), set_plane_exec(), SIM_cloth_solve(), sound_jack_sync_callback(), sound_mixdown_exec(), subdiv_levels_for_modifier_get(), vgroup_fix(), vpaint_proj_dm_map_cosnos_init(), vpaint_proj_dm_map_cosnos_update(), warpModifier_do(), waveModifier_do(), and wm_event_do_handlers().

◆ DEG_get_evaluated_view_layer()

struct ViewLayer* DEG_get_evaluated_view_layer ( const struct Depsgraph graph)

◆ DEG_get_input_scene()

struct Scene* DEG_get_input_scene ( const Depsgraph graph)

◆ DEG_get_input_view_layer()

struct ViewLayer* DEG_get_input_view_layer ( const Depsgraph graph)

◆ DEG_get_mode()

eEvaluationMode DEG_get_mode ( const Depsgraph graph)

◆ DEG_get_original_id()

struct ID* DEG_get_original_id ( struct ID id)

◆ DEG_get_original_object()

struct Object* DEG_get_original_object ( struct Object object)

◆ DEG_id_type_any_exists()

bool DEG_id_type_any_exists ( const struct Depsgraph depsgraph,
short  id_type 
)

◆ DEG_id_type_any_updated()

bool DEG_id_type_any_updated ( const struct Depsgraph depsgraph)

◆ DEG_id_type_updated()

bool DEG_id_type_updated ( const struct Depsgraph depsgraph,
short  id_type 
)

◆ DEG_is_evaluated_id()

bool DEG_is_evaluated_id ( const struct ID id)

◆ DEG_is_evaluated_object()

bool DEG_is_evaluated_object ( const struct Object object)

◆ DEG_is_fully_evaluated()

bool DEG_is_fully_evaluated ( const struct Depsgraph depsgraph)

◆ DEG_is_original_id()

bool DEG_is_original_id ( const struct ID id)

◆ DEG_is_original_object()

bool DEG_is_original_object ( const struct Object object)

◆ DEG_iterator_ids_begin()

void DEG_iterator_ids_begin ( struct BLI_Iterator iter,
DEGIDIterData data 
)

◆ DEG_iterator_ids_end()

void DEG_iterator_ids_end ( struct BLI_Iterator iter)

◆ DEG_iterator_ids_next()

void DEG_iterator_ids_next ( struct BLI_Iterator iter)

◆ DEG_iterator_objects_begin()

void DEG_iterator_objects_begin ( struct BLI_Iterator iter,
DEGObjectIterData data 
)

◆ DEG_iterator_objects_end()

void DEG_iterator_objects_end ( struct BLI_Iterator iter)

Definition at line 415 of file depsgraph_query_iter.cc.

References BLI_Iterator::data, data, and if().

◆ DEG_iterator_objects_next()

void DEG_iterator_objects_next ( struct BLI_Iterator iter)

Definition at line 397 of file depsgraph_query_iter.cc.

References BLI_Iterator::data, data, and BLI_Iterator::valid.

Referenced by DEG_iterator_objects_begin().