Blender V4.3
DEG_depsgraph_query.hh File Reference
#include "BLI_function_ref.hh"
#include "BLI_iterator.h"
#include "BLI_set.hh"
#include "BLI_utildefines.h"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DNA_object_types.h"
#include "BKE_object_types.hh"

Go to the source code of this file.

Classes

struct  DEGObjectIterSettings
 
struct  DEGObjectIterData
 
struct  DEGIDIterData
 

Functions

DEG input data
SceneDEG_get_input_scene (const Depsgraph *graph)
 
ViewLayerDEG_get_input_view_layer (const Depsgraph *graph)
 
MainDEG_get_bmain (const Depsgraph *graph)
 
eEvaluationMode DEG_get_mode (const Depsgraph *graph)
 
float DEG_get_ctime (const Depsgraph *graph)
 
DEG evaluated data
bool DEG_id_type_updated (const Depsgraph *depsgraph, short id_type)
 
bool DEG_id_type_any_updated (const Depsgraph *depsgraph)
 
bool DEG_id_type_any_exists (const Depsgraph *depsgraph, short id_type)
 
uint32_t DEG_get_eval_flags_for_id (const Depsgraph *graph, const ID *id)
 
void DEG_get_customdata_mask_for_object (const Depsgraph *graph, Object *object, CustomData_MeshMasks *r_mask)
 
SceneDEG_get_evaluated_scene (const Depsgraph *graph)
 
ViewLayerDEG_get_evaluated_view_layer (const Depsgraph *graph)
 
ObjectDEG_get_evaluated_object (const Depsgraph *depsgraph, Object *object)
 
IDDEG_get_evaluated_id (const Depsgraph *depsgraph, ID *id)
 
void DEG_get_evaluated_rna_pointer (const Depsgraph *depsgraph, PointerRNA *ptr, PointerRNA *r_ptr_eval)
 
ObjectDEG_get_original_object (Object *object)
 
IDDEG_get_original_id (ID *id)
 
Depsgraph * DEG_get_depsgraph_by_id (const ID &id)
 
bool DEG_is_original_id (const ID *id)
 
bool DEG_is_original_object (const Object *object)
 
bool DEG_is_evaluated_id (const ID *id)
 
bool DEG_is_evaluated_object (const Object *object)
 
bool DEG_is_fully_evaluated (const Depsgraph *depsgraph)
 
bool DEG_id_is_fully_evaluated (const Depsgraph *depsgraph, const ID *id_eval)
 
bool DEG_object_geometry_is_evaluated (const Object &object)
 
bool DEG_object_transform_is_evaluated (const Object &object)
 
bool DEG_collection_geometry_is_evaluated (const Collection &collection)
 
DEG ID iterators
void DEG_iterator_ids_begin (BLI_Iterator *iter, DEGIDIterData *data)
 
void DEG_iterator_ids_next (BLI_Iterator *iter)
 
void DEG_iterator_ids_end (BLI_Iterator *iter)
 

DEG object iterators

#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS
 
#define DEG_OBJECT_ITER_BEGIN(settings_, instance_)
 
#define DEG_OBJECT_ITER_END
 
enum  DegIterFlag {
  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)
}
 
void DEG_iterator_objects_begin (BLI_Iterator *iter, DEGObjectIterData *data)
 
void DEG_iterator_objects_next (BLI_Iterator *iter)
 
void DEG_iterator_objects_end (BLI_Iterator *iter)
 

DEG traversal

enum  { DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS = (1 << 0) }
 
using DEGForeachIDCallback = blender::FunctionRef<void(ID *id)>
 
using DEGForeachIDComponentCallback
 
void DEG_foreach_ancestor_ID (const Depsgraph *depsgraph, const ID *id, DEGForeachIDCallback callback)
 
void DEG_foreach_dependent_ID (const Depsgraph *depsgraph, const ID *id, DEGForeachIDCallback callback)
 
void DEG_foreach_dependent_ID_component (const Depsgraph *depsgraph, const ID *id, eDepsObjectComponentType source_component_type, int flags, DEGForeachIDComponentCallback callback)
 
void DEG_foreach_ID (const Depsgraph *depsgraph, DEGForeachIDCallback callback)
 

Detailed Description

Public API for Querying Depsgraph.

Definition in file DEG_depsgraph_query.hh.

Macro Definition Documentation

◆ DEG_OBJECT_ITER_BEGIN

#define DEG_OBJECT_ITER_BEGIN ( settings_,
instance_ )
Value:
{ \
DEGObjectIterData data_ = { \
(settings_), \
(settings_)->depsgraph, \
(int)(settings_)->flags, \
}; \
\
&data_, \
Object *, \
instance_)
void DEG_iterator_objects_begin(BLI_Iterator *iter, DEGObjectIterData *data)
void DEG_iterator_objects_end(BLI_Iterator *iter)
void DEG_iterator_objects_next(BLI_Iterator *iter)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int

Definition at line 258 of file DEG_depsgraph_query.hh.

Referenced by BKE_scene_foreach_display_point(), blender::ed::sculpt_paint::cloth::cloth_brush_collider_cache_create(), DRW_cache_free_old_batches(), DRW_draw_depth_loop(), DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), DRW_draw_select_id(), DRW_draw_select_loop(), DRW_render_check_grease_pencil(), DRW_render_object_iter(), blender::io::stl::export_frame(), blender::io::obj::filter_supported_objects(), blender::io::obj::OBJImportTest::import_and_check(), blender::io::stl::stl_importer_test::import_and_check(), lineart_main_load_geometries(), Freestyle::BlenderFileLoader::Load(), blender::io::ply::load_plydata(), make_child_duplis(), and stats_update().

◆ DEG_OBJECT_ITER_END

◆ DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS

Typedef Documentation

◆ DEGForeachIDCallback

Definition at line 302 of file DEG_depsgraph_query.hh.

◆ DEGForeachIDComponentCallback

Initial value:

Definition at line 303 of file DEG_depsgraph_query.hh.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Starts traversal from given component of the given ID, invokes callback for every other component which is directly on indirectly dependent on the source one.

Enumerator
DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS 

Definition at line 321 of file DEG_depsgraph_query.hh.

◆ DegIterFlag

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 178 of file DEG_depsgraph_query.hh.

Function Documentation

◆ DEG_collection_geometry_is_evaluated()

bool DEG_collection_geometry_is_evaluated ( const Collection & collection)

Same as DEG_object_geometry_is_evaluated but for the geometry of all objects in the collection.

Definition at line 413 of file depsgraph_query.cc.

References operation_needs_update().

Referenced by blender::nodes::node_geo_collection_info_cc::node_geo_exec().

◆ DEG_foreach_ancestor_ID()

void DEG_foreach_ancestor_ID ( const Depsgraph * depsgraph,
const ID * id,
DEGForeachIDCallback callback )
Note
Modifies runtime flags in depsgraph nodes, so can not be used in parallel. Keep an eye on that!

Definition at line 266 of file depsgraph_query_foreach.cc.

References callback, and depsgraph.

◆ DEG_foreach_dependent_ID()

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

Definition at line 249 of file depsgraph_query_foreach.cc.

References callback, and depsgraph.

◆ 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 )

Definition at line 256 of file depsgraph_query_foreach.cc.

References callback, and depsgraph.

Referenced by flush_trans_object_base_deps_flag().

◆ DEG_foreach_ID()

void DEG_foreach_ID ( const Depsgraph * depsgraph,
DEGForeachIDCallback callback )

Definition at line 273 of file depsgraph_query_foreach.cc.

References callback, and depsgraph.

◆ DEG_get_bmain()

◆ DEG_get_ctime()

float DEG_get_ctime ( const Depsgraph * graph)

Get time that depsgraph is being evaluated or was last evaluated at.

Definition at line 107 of file depsgraph_query.cc.

References blender::deg::Depsgraph::ctime, and graph.

Referenced by blender::ed::object::apply_grease_pencil_for_modifier(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_animsys_eval_animdata(), BKE_animsys_eval_driver(), BKE_grease_pencil_data_update(), BKE_mask_eval_animation(), BKE_mask_eval_update(), BKE_object_where_is_calc(), BKE_object_where_is_calc_ex(), BKE_rigidbody_eval_simulation(), BKE_rigidbody_object_sync_transforms(), BKE_rigidbody_rebuild_sim(), camera_view3d_reconstruction(), camerasolver_evaluate(), clothModifier_do(), deform_verts(), deform_verts(), deform_verts(), blender::io::alembic::ABCPointsWriter::do_write(), blender::draw::drw_particle_update_ptcache_edit(), followtrack_context_init(), get_effector_data(), GPENCIL_cache_init(), blender::ed::greasepencil::grease_pencil_reproject_exec(), image_camera_background_texture_get(), image_user_id_eval_animation(), blender::draw::overlay::Instance::init(), make_duplis_particle_system(), MOD_init_texture(), modify_geometry_set(), modify_mesh(), motion_path_cache(), blender::NodesModifierBakeParams::NodesModifierBakeParams(), blender::NodesModifierSimulationParams::NodesModifierSimulationParams(), blender::draw::overlay::Relations::object_sync(), objectsolver_evaluate(), OVERLAY_engine_init(), OVERLAY_relationship_lines(), blender::draw::particle_batch_cache_ensure_pos(), particle_system_update(), precalculate_effector(), psys_get_particle_state(), transformcache_evaluate(), volume_sequence_frame(), and waveModifier_do().

◆ DEG_get_customdata_mask_for_object()

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

◆ DEG_get_depsgraph_by_id()

Depsgraph * DEG_get_depsgraph_by_id ( const ID & id)

Get the depsgraph that owns the given ID. This is efficient because the depsgraph is cached on the ID.

Only IDs that use the copy-on-eval mechanism of depsgraph evaluation have a corresponding depsgraph. Original IDs as well as temporary IDs e.g. generated by geometry nodes do not have a corresponding depsgraph, so null is returned here for these IDs.

Definition at line 291 of file depsgraph_query.cc.

Referenced by operation_needs_update().

◆ DEG_get_eval_flags_for_id()

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

◆ DEG_get_evaluated_id()

◆ DEG_get_evaluated_object()

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

Get evaluated version of object for given original one.

Definition at line 213 of file depsgraph_query.cc.

References DEG_get_evaluated_id(), and depsgraph.

Referenced by blender::ed::object::add_hook_object(), add_verts_to_dgroups(), animviz_calc_motionpaths(), apply_armature_pose2bones_exec(), blender::ed::object::apply_grease_pencil_for_modifier(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::object::apply_objects_internal(), axis_set_view(), blender::ed::object::bake(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), bc_get_mesh_copy(), BKE_camera_params_from_view3d(), BKE_camera_view_frame_fit_to_coords(), BKE_constraint_apply_for_object(), BKE_constraint_apply_for_pose(), BKE_crazyspace_get_mapped_editverts(), BKE_editmesh_vert_coords_when_deformed(), 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_calc_parent(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_layout(), BKE_pointcloud_to_mesh(), BKE_ptcache_bake(), BKE_sculpt_update_object_for_edit(), bpy_bmesh_from_object(), bvh_get_mesh(), calcEdgeSlide_mval_range(), blender::io::grease_pencil::compute_objects_bounds(), crazyspace_init_object_for_eval(), blender::ed::transform::greasepencil::createTransGreasePencilVerts(), curve_from_curve_object(), curve_from_font_object(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), blender::ed::object::data_transfer_exec(), blender::ed::object::data_xform_container_update_all(), blender::ed::object::datalayout_transfer_exec(), disconnect_hair(), do_grease_pencil_box_select(), do_lasso_select_grease_pencil(), do_render_full_pipeline(), DRW_select_buffer_context_create(), DRW_select_buffer_context_offset_for_object_elem(), blender::ed::object::dt_layers_select_src_itemf(), dynamicpaint_bake_exec(), ed_grease_pencil_select_pick(), ED_mesh_pick_face_vert(), ED_mesh_pick_vert(), ED_mesh_shapes_join_objects_exec(), ED_object_particle_edit_mode_enter_ex(), ED_object_texture_paint_mode_enter_ex(), ED_view3d_camera_lock_init_ex(), ED_view3d_camera_lock_sync(), ED_view3d_camera_to_view_selected_with_set_clipping(), 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(), EDBM_unified_findnearest_from_raycast(), blender::draw::overlay::MeshUVs::edit_object_sync(), blender::ensure_shrinkwrap_cache_data(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::io::stl::export_frame(), blender::io::grease_pencil::PDFExporter::export_grease_pencil_objects(), blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), blender::io::grease_pencil::PDFExporter::export_scene(), blender::ed::greasepencil::fill_strokes(), blender::ed::greasepencil::fit_strokes_to_view(), font_cursor_set_apply(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing(), blender::ed::sculpt_paint::greasepencil::GrabOperation::foreach_grabbed_drawing(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeParams::from_context(), FRS_do_stroke_rendering(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), gizmo_preselect_edgering_test_select(), gizmo_preselect_elem_test_select(), GPENCIL_render_init(), GPENCIL_render_to_image(), grease_pencil_circle_select(), blender::ed::object::ignore_parent_tx(), blender::io::obj::OBJImportTest::import_and_check(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::init_weight_data_for_drawings(), Freestyle::BlenderFileLoader::insertShapeNode(), iter_snap_objects(), knifeproject_poly_from_object(), lineart_main_load_geometries(), lineart_object_load_single_instance(), blender::io::ply::load_plydata(), make_duplis_font(), blender::ed::object::make_object_duplilist_real(), match_texture_space_exec(), meshobject_foreachScreenVert(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), MOD_lineart_compute_feature_lines_v3(), MOD_lineart_gpencil_generate_v3(), blender::ed::object::modifier_apply(), blender::ed::object::modifier_apply_obdata(), blender::ed::object::modifier_apply_shape(), blender::ed::object::modifier_skin_armature_create(), motion_path_cache(), motionpaths_calc_bake_targets(), move_cursor(), multires_mark_as_modified(), multires_reshape_create_subdiv(), multiresModifier_reshapeFromObject(), blender::nodes::node_geo_input_active_camera_cc::node_exec(), blender::io::obj::OBJCurve::OBJCurve(), blender::ed::object::object_convert_exec(), blender::ed::object::object_data_convert_curve_to_mesh(), blender::ed::object::object_force_modifier_update_for_bind(), blender::ed::object::object_origin_set_exec(), blender::ed::object::object_overlay_mode_transfer_animation_start(), object_preview_render(), blender::draw::overlay::Cameras::object_sync(), blender::ed::object::object_xform_skip_child_container_update_all(), ObjectToTransData(), blender::io::obj::OBJMesh::OBJMesh(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), OVERLAY_camera_cache_populate(), OVERLAY_edit_uv_cache_init(), OVERLAY_grid_init(), paint_sample_color(), paint_weight_gradient_exec(), paintface_flush_flags(), paintface_select_loop(), panel_draw(), blender::ed::object::parent_set(), blender::ed::object::parent_set_vertex_parent(), particle_intersect_mesh(), blender::bke::object::pbvh_ensure(), 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(), blender::eevee::LightBake::run(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::greasepencil::selection_update(), blender::nodes::GeoNodesCallData::self_object(), seq_render_scene_strip(), set_plane_exec(), shrinkwrapModifier_deform(), snap_curs_to_sel_ex(), snap_selected_to_location(), blender::ed::spreadsheet::spreadsheet_get_object_eval(), blender::ed::greasepencil::stroke_trim_execute(), text_update_edited(), blender::bke::pbvh::update_normals(), blender::ed::sculpt_paint::use_add_density_mode(), uv_select_tag_update_for_object(), uv_shortest_path_pick_ex(), validate_object_select_id(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), blender::bke::pbvh::vert_positions_eval_for_write(), view3d_camera_border(), view3d_camera_to_view_selected_impl(), view3d_localview_init(), view3d_viewmatrix_set(), view_lock_to_active_exec(), blender::ed::object::visual_transform_apply_exec(), vpaint_proj_dm_map_cosnos_init(), vpaint_proj_dm_map_cosnos_update(), blender::ed::greasepencil::weight_sample_invoke(), blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh(), and workbench_render_to_image().

◆ DEG_get_evaluated_rna_pointer()

◆ DEG_get_evaluated_scene()

Scene * DEG_get_evaluated_scene ( const Depsgraph * graph)

Get scene at its evaluated state.

Technically, this is a copied-on-written and fully evaluated version of the input scene. This function will check that the data-block has been expanded (and copied) from the original one. Assert will happen if it's not.

Definition at line 187 of file depsgraph_query.cc.

References BLI_assert, blender::deg::deg_eval_copy_is_expanded(), graph, Scene::id, and blender::deg::Depsgraph::scene_cow.

Referenced by action_preview_render(), blender::ed::object::add_hook_object(), bake_strokes(), BKE_cachefile_filepath_get(), BKE_camera_view_frame_fit_to_coords(), BKE_constraint_apply_for_object(), BKE_constraint_apply_for_pose(), BKE_crazyspace_get_mapped_editverts(), BKE_effectors_create(), BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_multires_create_mesh(), BKE_scene_update_sound(), bpy_bmesh_from_object(), C_BVHTree_FromObject(), blender::ed::space_node::compo_startjob(), blender::io::alembic::ABCCameraWriter::create_alembic_objects(), deform_verts(), deform_verts(), deform_verts(), deform_verts(), deform_verts(), DEG_get_evaluated_view_layer(), DEG_iterator_objects_begin(), displaceModifier_do(), blender::io::alembic::ABCPointsWriter::do_write(), blender::io::usd::USDCameraWriter::do_write(), driver_target_context_from_animation_context(), DRW_custom_pipeline_begin(), DRW_draw_depth_loop(), 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_notify_view_update_offscreen(), DRW_render_gpencil(), DRW_render_set_time(), DRW_render_to_image(), dynamicpaint_bake_exec(), ED_mesh_shapes_join_objects_exec(), ED_screen_animation_play(), ED_view3d_depth_override(), ED_view3d_has_depth_buffer_updated(), blender::ed::object::force_evaluation_if_constraint_disabled(), FRS_do_stroke_rendering(), GPENCIL_render_init(), blender::ed::object::ignore_parent_tx(), blender::workbench::SceneState::init(), mesh_new_from_mesh_object_with_layers(), MOD_lineart_compute_feature_lines_v3(), blender::ed::object::modifier_apply_obdata(), blender::ed::object::modifier_apply_shape(), blender::ed::object::modifier_skin_armature_create(), blender::modify_geometry_set(), blender::modify_geometry_set(), modify_geometry_set(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), multires_as_mesh(), multires_ccg_settings_init(), multires_reshape_context_create_from_base_mesh(), multires_reshape_context_create_from_object(), multires_reshape_create_subdiv(), blender::nodes::node_geo_input_active_camera_cc::node_exec(), blender::ed::object::object_force_modifier_update_for_bind(), blender::bke::object_get_datamask(), object_preview_render(), 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(), blender::render::hydra::Engine::sync(), view3d_all_exec(), view3d_orbit_calc_center(), viewselected_exec(), and wm_event_do_handlers().

◆ DEG_get_evaluated_view_layer()

◆ DEG_get_input_scene()

◆ DEG_get_input_view_layer()

◆ DEG_get_mode()

eEvaluationMode DEG_get_mode ( const Depsgraph * graph)

Get evaluation mode that depsgraph was built for.

Definition at line 101 of file depsgraph_query.cc.

References graph, and blender::deg::Depsgraph::mode.

Referenced by BKE_collision_relations_create(), BKE_effector_relations_create(), BKE_mball_polygonize(), BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_object_eval_eval_base_flags(), BKE_object_handle_data_update(), BKE_scene_update_sound(), BKE_volume_simplify_factor(), BKE_volume_simplify_level(), bpy_bmesh_from_object(), blender::ed::geometry::build_extra_depsgraph(), bvh_get_mesh(), curve_from_curve_object(), curves_evaluate_modifiers(), DEG_debug_graph_relations_validate(), DEG_iterator_objects_begin(), blender::io::SubdivModifierDisabler::disable_modifiers(), distribute_invalid(), blender::draw::drw_particle_update_ptcache_edit(), dynamicPaint_doStep(), blender::bke::editbmesh_calc_modifiers(), get_dupli_generator(), blender::io::usd::get_enabled_modifier(), grease_pencil_evaluate_modifiers(), image_user_id_eval_animation(), blender::io::hydra::MaterialData::init(), init_meta(), blender::io::hydra::HairData::is_visible(), blender::io::hydra::ObjectData::is_visible(), lineart_main_load_geometries(), Freestyle::BlenderFileLoader::Load(), make_child_duplis(), make_duplis_collection(), make_duplis_geometry_set_impl(), make_duplis_particle_system(), blender::bke::mesh_calc_modifiers(), blender::nodes::node_geo_is_viewport_cc::node_geo_exec(), pointcloud_evaluate_modifiers(), pointdensity_cache_psys(), blender::io::hydra::USDSceneDelegate::populate(), psys_in_edit_mode(), psys_sim_data_init(), psys_thread_context_init_distribute(), psys_update_path_cache(), and volume_evaluate_modifiers().

◆ DEG_get_original_id()

◆ DEG_get_original_object()

Object * DEG_get_original_object ( Object * object)

Get original version of object for given evaluated one.

Definition at line 281 of file depsgraph_query.cc.

References DEG_get_original_id().

Referenced by BKE_curves_data_update(), BKE_grease_pencil_data_update(), BKE_modifier_get_original(), BKE_object_handle_data_update(), BKE_object_is_deform_modified(), BKE_object_is_modified(), BKE_object_sync_to_original(), BKE_sculpt_update_object_after_eval(), BKE_sculpt_update_object_before_eval(), BKE_sculpt_update_object_for_edit(), blender::ed::spreadsheet::data_source_from_geometry(), blender::eevee::ShadowModule::debug_end_sync(), deform_verts(), blender::draw::overlay::Armatures::draw_armature_edit(), blender::draw::overlay::Armatures::draw_armature_pose(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::draw::drw_particle_get_hair_source(), blender::draw::drw_particle_update_ptcache(), blender::draw::drw_particle_update_ptcache_edit(), drw_select_filter_object_mode_lock_for_weight_paint(), ED_grease_pencil_join_objects_exec(), ED_view3d_minmax_verts(), blender::draw::overlay::MeshUVs::edit_object_sync(), blender::draw::overlay::Particles::edit_object_sync(), blender::draw::pbvh::DrawCacheImpl::ensure_lines_batches(), blender::draw::pbvh::DrawCacheImpl::ensure_material_indices(), blender::draw::pbvh::DrawCacheImpl::ensure_tris_batches(), blender::bke::pbvh::face_normals_eval_from_eval(), blender::find_side_effect_nodes_for_active_gizmos(), blender::find_side_effect_nodes_for_viewer_path(), getOriginalModifierData(), blender::ed::object::make_object_duplilist_real(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), object_duplilist_preview(), blender::bke::object_get_datamask(), blender::draw::overlay::Paints::object_sync(), object_update_from_subsurf_ccg(), blender::eevee::ObjectKey::ObjectKey(), OVERLAY_edit_curves_init(), OVERLAY_edit_particle_cache_populate(), OVERLAY_paint_texture_cache_populate(), OVERLAY_paint_vertex_cache_populate(), sbStoreLastFrame(), select_id_get_object_select_mode(), snap_curs_to_sel_ex(), snap_sel_to_grid_exec(), blender::ed::spreadsheet::spreadsheet_get_display_geometry_set(), blender::bke::pbvh::update_normals_from_eval(), blender::bke::pbvh::vert_normals_eval_from_eval(), blender::bke::pbvh::vert_positions_eval_from_eval(), view3d_all_exec(), view3d_orbit_calc_center(), and viewselected_exec().

◆ DEG_id_is_fully_evaluated()

bool DEG_id_is_fully_evaluated ( const Depsgraph * depsgraph,
const ID * id_eval )

Check every component of the data-block is evaluated. For example, an object disabled in the viewport is not fully evaluated, even though the copy-on-eval data-block is created.

Definition at line 349 of file depsgraph_query.cc.

References depsgraph, blender::deg::DEPSOP_FLAG_NEEDS_UPDATE, blender::deg::Depsgraph::find_id_node(), blender::deg::get_original_id(), and id_node.

Referenced by blender::ed::geometry::run_node_group_exec().

◆ DEG_id_type_any_exists()

bool DEG_id_type_any_exists ( const Depsgraph * depsgraph,
short id_type )

◆ DEG_id_type_any_updated()

bool DEG_id_type_any_updated ( const Depsgraph * depsgraph)

◆ DEG_id_type_updated()

bool DEG_id_type_updated ( const Depsgraph * depsgraph,
short id_type )

Check if given ID type was tagged for update.

Definition at line 113 of file depsgraph_query.cc.

References BKE_idtype_idcode_to_index(), graph, and blender::deg::Depsgraph::id_type_updated.

Referenced by blender::draw::compositor::Engine::update().

◆ DEG_is_evaluated_id()

◆ DEG_is_evaluated_object()

◆ DEG_is_fully_evaluated()

bool DEG_is_fully_evaluated ( const Depsgraph * depsgraph)

Check whether depsgraph is fully evaluated. This includes the following checks:

  • Relations are up-to-date.
  • Nothing is tagged for update.

Definition at line 335 of file depsgraph_query.cc.

References depsgraph, blender::deg::Depsgraph::entry_tags, and blender::deg::Depsgraph::need_update_relations.

Referenced by BKE_scene_graph_update_for_newframe_ex(), and scene_graph_update_tagged().

◆ DEG_is_original_id()

bool DEG_is_original_id ( const ID * id)

Check whether given ID is an original.

Original IDs are considered all the IDs which are not covered by copy-on-evaluation system and are not out-of-main localized data-blocks.

Definition at line 296 of file depsgraph_query.cc.

References ID_TAG_COPIED_ON_EVAL, ID_TAG_COPIED_ON_EVAL_FINAL_RESULT, and ID_TAG_LOCALIZED.

Referenced by BKE_object_get_editmesh_eval_cage(), BKE_object_get_editmesh_eval_final(), BKE_object_get_mesh_deform_eval(), BM_mesh_bm_from_me(), DEG_is_evaluated_id(), DEG_is_original_object(), and mesh_new_from_mesh_object_with_layers().

◆ DEG_is_original_object()

◆ DEG_iterator_ids_begin()

◆ DEG_iterator_ids_end()

void DEG_iterator_ids_end ( BLI_Iterator * iter)

Definition at line 503 of file depsgraph_query_iter.cc.

◆ DEG_iterator_ids_next()

◆ DEG_iterator_objects_begin()

◆ DEG_iterator_objects_end()

void DEG_iterator_objects_end ( BLI_Iterator * iter)

Definition at line 416 of file depsgraph_query_iter.cc.

References BLI_Iterator::data.

◆ DEG_iterator_objects_next()

void DEG_iterator_objects_next ( BLI_Iterator * iter)

◆ DEG_object_geometry_is_evaluated()

bool DEG_object_geometry_is_evaluated ( const Object & object)

Returns false when the objects geometry is not fully evaluated in its depsgraph yet. In this case, the geometry must not be accessed. Otherwise returns true when geometry is fully evaluated or the object does not belong to any specific depsgraph.

The result of this function is non deterministic when multi-threading is used because the depsgraph nodes are not totally ordered. When the depsgraph contains all correct relations and there are no cycles, the result should always be true here though. So it does not break determinism when there are no dependency graph cycles.

Definition at line 401 of file depsgraph_query.cc.

References operation_needs_update().

Referenced by BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_object_get_evaluated_mesh(), BKE_object_get_evaluated_mesh_no_subsurf(), blender::nodes::node_geo_object_info_cc::node_geo_exec(), and blender::bke::object_get_evaluated_geometry_set().

◆ DEG_object_transform_is_evaluated()

bool DEG_object_transform_is_evaluated ( const Object & object)

Same as DEG_object_geometry_is_evaluated but for the transformation of the object.

Definition at line 407 of file depsgraph_query.cc.

References operation_needs_update().

Referenced by blender::nodes::node_geo_object_info_cc::node_geo_exec().