Blender V5.0
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_duplilist.hh"
#include "BKE_object_types.hh"

Go to the source code of this file.

Classes

struct  DEGObjectIterSettings
struct  DEGObjectIterData
struct  DEGIDIterData

Namespaces

namespace  evil

Functions

bool evil::DEG_iterator_temp_object_from_dupli (const Object *dupli_parent, const DupliObject *dupli, eEvaluationMode eval_mode, bool do_matrix_setup, Object *r_temp_object, ObjectRuntimeHandle *r_temp_runtime)
void evil::DEG_iterator_temp_object_free_properties (const DupliObject *dupli, Object *temp_object)
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)
IDDEG_get_evaluated_id (const Depsgraph *depsgraph, ID *id)
const IDDEG_get_evaluated_id (const Depsgraph *depsgraph, const ID *id)
template<typename T>
TDEG_get_evaluated (const Depsgraph *depsgraph, T *id)
template<typename T>
const TDEG_get_evaluated (const Depsgraph *depsgraph, const T *id)
void DEG_get_evaluated_rna_pointer (const Depsgraph *depsgraph, PointerRNA *ptr, PointerRNA *r_ptr_eval)
IDDEG_get_original_id (ID *id)
const IDDEG_get_original_id (const ID *id)
template<typename T>
TDEG_get_original (T *id)
template<typename T>
const TDEG_get_original (const T *id)
Depsgraph * DEG_get_depsgraph_by_id (const ID &id)
bool DEG_is_original_id (const ID *id)
template<typename T>
bool DEG_is_original (const T *id)
bool DEG_is_evaluated_id (const ID *id)
template<typename T>
bool DEG_is_evaluated (const T *id)
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 object iterators - Manual dupli iteration

Helper functions for handling dupli instances iteration manually (ie. without passing DEG_ITER_OBJECT_FLAG_DUPLI to DEGObjectIterSettings::flags)

bool DEG_iterator_object_is_visible (eEvaluationMode eval_mode, const Object *ob)
bool DEG_iterator_dupli_is_visible (const DupliObject *dupli, eEvaluationMode eval_mode)
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

◆ DEG_OBJECT_ITER_END

◆ DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS

#define DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS

Typedef Documentation

◆ DEGForeachIDCallback

Definition at line 391 of file DEG_depsgraph_query.hh.

◆ DEGForeachIDComponentCallback

Initial value:

Definition at line 392 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 410 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 210 of file DEG_depsgraph_query.hh.

Function Documentation

◆ DEG_collection_geometry_is_evaluated()

bool DEG_collection_geometry_is_evaluated ( const Collection & collection)

◆ 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 261 of file depsgraph_query_foreach.cc.

References depsgraph.

◆ DEG_foreach_dependent_ID()

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

Definition at line 244 of file depsgraph_query_foreach.cc.

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

◆ DEG_foreach_ID()

void DEG_foreach_ID ( const Depsgraph * depsgraph,
DEGForeachIDCallback callback )

Definition at line 268 of file depsgraph_query_foreach.cc.

References 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 104 of file depsgraph_query.cc.

References blender::deg::Depsgraph::ctime.

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(), blender::draw::gpencil::Instance::begin_sync(), BKE_animsys_eval_animdata(), BKE_animsys_eval_driver(), BKE_grease_pencil_eval_geometry(), BKE_mask_eval_animation(), BKE_mask_eval_update(), BKE_object_eval_grease_pencil(), BKE_object_where_is_calc(), BKE_object_where_is_calc_ex(), BKE_rigidbody_eval_simulation(), BKE_rigidbody_object_sync_transforms(), BKE_rigidbody_rebuild_sim(), 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(), blender::ed::geometry::get_original_geometry_eval_copy(), blender::ed::greasepencil::grease_pencil_reproject_exec(), image_user_id_eval_animation(), blender::draw::overlay::Instance::init(), make_duplis_particle_system(), MOD_init_texture(), modify_geometry_set(), modify_mesh(), blender::NodesModifierBakeParams::NodesModifierBakeParams(), blender::NodesModifierSimulationParams::NodesModifierSimulationParams(), blender::draw::overlay::Relations::object_sync(), objectsolver_evaluate(), blender::draw::particle_batch_cache_ensure_pos(), particle_system_update(), precalculate_effector(), psys_get_particle_state(), blender::ed::geometry::store_result_geometry(), transformcache_evaluate(), volume_sequence_frame(), and waveModifier_do().

◆ DEG_get_customdata_mask_for_object()

◆ 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 285 of file depsgraph_query.cc.

Referenced by BPy_GeometrySet_static_from_evaluated_object(), and 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() [1/2]

template<typename T>
const T * DEG_get_evaluated ( const Depsgraph * depsgraph,
const T * id )

Definition at line 103 of file DEG_depsgraph_query.hh.

References DEG_get_evaluated_id(), depsgraph, and T.

◆ DEG_get_evaluated() [2/2]

template<typename T>
T * DEG_get_evaluated ( const Depsgraph * depsgraph,
T * id )

Definition at line 97 of file DEG_depsgraph_query.hh.

References DEG_get_evaluated_id(), depsgraph, and T.

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(), blender::draw::overlay::MeshUVs::begin_sync(), blender::eevee::MaterialModule::begin_sync(), BKE_cachefile_reload(), BKE_camera_params_from_view3d(), BKE_camera_view_frame_fit_to_coords(), BKE_collider_cache_create(), BKE_collision_objects_create(), BKE_constraint_apply_for_object(), BKE_constraint_apply_for_pose(), BKE_crazyspace_get_mapped_editverts(), BKE_editmesh_vert_coords_when_deformed(), BKE_effectors_create(), 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(), box_select_exec(), bpy_bmesh_from_object(), bvh_get_mesh(), blender::ed::transform::calcEdgeSlide_mval_range(), circle_select_exec(), blender::ed::space_node::compo_initjob(), blender::ed::object::convert_curves_component_to_curves(), blender::ed::object::convert_curves_to_grease_pencil(), blender::ed::object::convert_curves_to_mesh(), blender::ed::object::convert_font_to_curve_legacy_generic(), blender::ed::object::convert_grease_pencil_component_to_curves(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::ed::object::convert_mball_to_mesh(), blender::ed::object::convert_mesh_to_grease_pencil(), blender::ed::object::convert_mesh_to_mesh(), 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_lasso_select_mask(), 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_mask_draw_region(), ED_mask_feather_find_nearest(), ED_mask_find_nearest_diff_point(), ED_mask_point_find_nearest(), ED_mask_selected_minmax(), 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_screen_exit(), ED_view3d_camera_lock_init_ex(), ED_view3d_camera_lock_sync(), ED_view3d_camera_to_view_selected_with_set_clipping(), 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::bke::editbmesh_get_eval_cage_from_orig(), 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::io::grease_pencil::SVGExporter::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(), blender::seq::CompositorContext::get_node_tree(), blender::nodes::get_only_evaluated_id(), gizmo_preselect_edgering_test_select(), gizmo_preselect_elem_test_select(), grease_pencil_circle_select(), blender::ed::sculpt_paint::grease_pencil_erase_box_exec(), blender::ed::sculpt_paint::grease_pencil_erase_lasso_exec(), blender::ed::object::ignore_parent_tx(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::init_weight_data_for_drawings(), Freestyle::BlenderFileLoader::insertShapeNode(), blender::ed::transform::iter_snap_objects(), knifeproject_poly_from_object(), knifetool_init_obinfo(), blender::ed::object::lattice_add_to_selected_collect_targets_and_calc_bounds(), 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(), 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::nodes::node_shader_normal_map_cc::node_shader_buts_normal_map(), blender::nodes::node_shader_tangent_cc::node_shader_buts_tangent(), blender::nodes::node_shader_uvmap_cc::node_shader_buts_uvmap(), blender::nodes::node_shader_vertex_color_cc::node_shader_buts_vertex_color(), 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::ed::object::object_rand_verts_exec(), blender::ed::object::object_xform_skip_child_container_update_all(), blender::ed::transform::ObjectToTransData(), blender::io::obj::OBJLegacyCurve::OBJLegacyCurve(), 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(), 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_nonvertex_parent(), 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(), blender::draw::gpencil::render_frame(), renderresult_stampinfo(), rigidbody_objects_calc_mass_exec(), ringsel_find_edge(), blender::eevee::LightBake::run(), blender::ed::geometry::run_node_group_exec(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::greasepencil::selection_update(), blender::nodes::GeoNodesCallData::self_object(), blender::seq::seq_render_scene_strip_ex(), set_plane_exec(), shrinkwrapModifier_deform(), snap_curs_to_sel_ex(), snap_selected_to_location_rotation(), spline_under_mouse_get(), blender::ed::spreadsheet::spreadsheet_get_object_eval(), blender::ed::greasepencil::stroke_trim_execute(), blender::eevee::World::sync(), text_update_edited(), blender::ed::transform::transform_convert_mesh_crazyspace_detect(), 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_stereo3d_setup(), view3d_viewmatrix_set(), view_lock_to_active_exec(), blender::ed::object::visual_geometry_to_objects_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_id() [1/2]

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

Definition at line 215 of file depsgraph_query.cc.

References DEG_get_evaluated_id(), and depsgraph.

◆ DEG_get_evaluated_id() [2/2]

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

◆ DEG_get_evaluated_rna_pointer()

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

◆ 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 184 of file depsgraph_query.cc.

References BLI_assert, blender::deg::deg_eval_copy_is_expanded(), 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_draw_select_loop(), DRW_draw_view(), DRW_render_gpencil(), DRW_render_set_time(), DRW_render_to_image(), dynamicpaint_bake_exec(), ED_view3d_depth_override(), ED_view3d_has_depth_buffer_updated(), blender::ed::object::force_evaluation_if_constraint_disabled(), FRS_do_stroke_rendering(), blender::render::hydra::gf_camera(), 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::nodes::node_geo_camera_info_cc::node_geo_exec(), blender::ed::object::object_force_modifier_update_for_bind(), blender::bke::object_get_datamask(), object_preview_render(), render_init_depsgraph(), scene_preview_render(), screen_animation_step_invoke(), screen_opengl_render_anim_init(), blender::seq::seq_prefetch_init_depsgraph(), blender::seq::seq_render_scene_strip_ex(), set_plane_exec(), SIM_cloth_solve(), sound_jack_sync_callback(), sound_mixdown_exec(), start_playback(), stop_playback(), subdiv_levels_for_modifier_get(), blender::render::hydra::Engine::sync(), view3d_calc_minmax_selected(), view3d_calc_minmax_visible(), view3d_orbit_calc_center(), and blender::render::hydra::ViewSettings::ViewSettings().

◆ DEG_get_evaluated_view_layer()

◆ DEG_get_input_scene()

Scene * DEG_get_input_scene ( const Depsgraph * graph)

Get scene that depsgraph was built for.

Definition at line 80 of file depsgraph_query.cc.

References blender::deg::Depsgraph::scene.

Referenced by action_preview_render(), BKE_collision_relations_create(), BKE_scene_graph_update_for_newframe_ex(), BKE_volume_simplify_factor(), BKE_volume_simplify_level(), BPy_GeometrySet_static_from_evaluated_object(), blender::ed::geometry::build_extra_depsgraph(), curve_from_curve_object(), DEG_editors_update(), DEG_evaluate_on_framechange(), DEG_evaluate_on_refresh(), blender::io::SubdivModifierDisabler::disable_modifiers(), drw_callbacks_post_scene(), dynamicPaint_bakeImageSequence(), ED_preview_icon_job(), ED_render_view3d_update(), ED_update_for_newframe(), ED_view3d_cursor_snap_data_update(), engine_depsgraph_init(), blender::io::alembic::export_startjob(), blender::io::usd::export_to_stage(), blender::io::obj::exporter_main(), blender::io::usd::get_enabled_modifier(), blender::io::alembic::ABCMetaballWriter::is_supported(), blender::io::usd::USDMetaballWriter::is_supported(), blender::ed::transform::iter_snap_objects(), blender::ed::object::modifier_skin_armature_create(), modify_mesh(), blender::nodes::node_geo_input_scene_time_cc::node_exec(), blender::NodesModifierSimulationParams::NodesModifierSimulationParams(), blender::io::hydra::HydraSceneDelegate::populate(), psys_in_edit_mode(), scene_graph_update_tagged(), sculpt_update_object(), v3d_cursor_snap_draw_fn(), view3d_calc_minmax_selected(), view3d_calc_minmax_visible(), view3d_calc_point_in_selected_bounds(), and view3d_ruler_item_mousemove().

◆ 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 98 of file depsgraph_query.cc.

References 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(), blender::draw::foreach_obref_in_scene(), 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(), 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() [1/2]

template<typename T>
const T * DEG_get_original ( const T * id)

Definition at line 125 of file DEG_depsgraph_query.hh.

References DEG_get_original_id(), and T.

◆ DEG_get_original() [2/2]

template<typename T>
T * DEG_get_original ( T * id)

Definition at line 119 of file DEG_depsgraph_query.hh.

References DEG_get_original_id(), and T.

Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), BKE_cachefile_eval(), BKE_collection_has_object_recursive_instanced_orig_id(), BKE_curve_eval_geometry(), BKE_curves_data_update(), BKE_mask_eval_update(), BKE_mesh_eval_geometry(), BKE_modifier_get_original(), BKE_object_eval_grease_pencil(), BKE_object_handle_data_update(), BKE_object_is_deform_modified(), BKE_object_is_modified(), BKE_object_material_from_eval_data(), BKE_object_sync_to_original(), BKE_sculpt_update_object_after_eval(), BKE_sculpt_update_object_before_eval(), BKE_sculpt_update_object_for_edit(), BKE_volume_eval_geometry(), constraint_find_original(), blender::ed::object::copy_materials_to_new_geometry_object(), blender::ed::spreadsheet::data_source_from_geometry(), blender::eevee::ShadowModule::debug_end_sync(), deform_verts(), DEG_get_collision_relations(), DEG_get_customdata_mask_for_object(), DEG_get_effector_relations(), blender::draw::overlay::Armatures::draw_armature_edit(), blender::draw::overlay::Armatures::draw_armature_pose(), blender::draw::DRW_curves_batch_cache_create_requested(), DRW_draw_select_loop(), 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_transverts_create_from_obedit(), ED_view3d_minmax_verts(), blender::draw::overlay::MeshUVs::edit_object_sync(), blender::draw::overlay::Particles::edit_object_sync(), blender::nodes::ensure_geometry_nodes_lazy_function_graph_impl(), blender::draw::pbvh::DrawCacheImpl::ensure_lines_batches(), blender::draw::pbvh::DrawCacheImpl::ensure_material_indices(), blender::draw::pbvh::DrawCacheImpl::ensure_tris_batches(), blender::nodes::LazyFunctionForClosureZone::execute_impl(), blender::nodes::LazyFunctionForEvaluateClosureNode::execute_impl(), blender::bke::pbvh::face_normals_eval_from_eval(), blender::find_side_effect_nodes_for_active_gizmos(), blender::find_side_effect_nodes_for_viewer_path(), foreach_assign_id_to_orig_callback(), foreach_libblock_make_original_callback(), blender::ed::spreadsheet::geometry_display_data_get(), blender::deg::light_linking::internal::EmitterDataMap::get_data(), blender::deg::light_linking::internal::LinkingData::get_light_set_for(), blender::nodes::geo_eval_log::get_original_session_uid(), blender::draw::compositor_engine::Context::get_pass(), getOriginalModifierData(), blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph(), blender::nodes::LazyFunctionForForeachGeometryElementZone::initialize_execution_graph(), blender::ed::object::make_object_duplilist_real(), blender::draw::overlay::Sculpts::mesh_sync(), movieclip_eval_update_generic(), movieclip_eval_update_reload(), blender::ed::space_node::node_editor_is_for_geometry_nodes_modifier(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_object_info_cc::node_geo_exec(), object_duplilist_preview(), blender::bke::object_get_datamask(), blender::draw::overlay::Paints::object_sync(), object_update_from_subsurf_ccg(), blender::draw::ObjectKey::ObjectKey(), pyrna_struct_repr(), pyrna_struct_str(), sbStoreLastFrame(), snap_curs_to_sel_ex(), snap_sel_to_grid_exec(), blender::eevee::store_node_tree_errors(), blender::eevee::World::sync(), blender::bke::pbvh::update_normals_from_eval(), blender::bke::pbvh::vert_normals_eval_from_eval(), blender::bke::pbvh::vert_positions_eval_from_eval(), view3d_calc_minmax_selected(), view3d_calc_minmax_visible(), and view3d_orbit_calc_center().

◆ DEG_get_original_id() [1/2]

const ID * DEG_get_original_id ( const ID * id)

Definition at line 280 of file depsgraph_query.cc.

References blender::deg::get_original_id().

◆ DEG_get_original_id() [2/2]

◆ 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 333 of file depsgraph_query.cc.

References blender::deg::IDNode::components, depsgraph, blender::deg::DEPSOP_FLAG_NEEDS_UPDATE, blender::deg::Depsgraph::find_id_node(), blender::deg::OperationNode::flag, and blender::deg::get_original_id().

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 110 of file depsgraph_query.cc.

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

◆ DEG_is_evaluated()

◆ DEG_is_evaluated_id()

bool DEG_is_evaluated_id ( const ID * id)

Definition at line 314 of file depsgraph_query.cc.

References DEG_is_original_id().

Referenced by DEG_is_evaluated().

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

◆ 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 290 of file depsgraph_query.cc.

References ID_TAG_COPIED_ON_EVAL, ID_TAG_COPIED_ON_EVAL_FINAL_RESULT, ID_TAG_LOCALIZED, and ID::tag.

Referenced by DEG_is_evaluated_id(), and DEG_is_original().

◆ DEG_iterator_dupli_is_visible()

bool DEG_iterator_dupli_is_visible ( const DupliObject * dupli,
eEvaluationMode eval_mode )

Returns true if the dupli instance should be visible on the given context.

Definition at line 478 of file depsgraph_query_iter.cc.

References GS, ID_MB, ID::name, DupliObject::no_draw, DupliObject::ob, DupliObject::ob_data, OB_MBALL, and Object::type.

Referenced by blender::draw::foreach_obref_in_scene().

◆ DEG_iterator_ids_begin()

◆ DEG_iterator_ids_end()

void DEG_iterator_ids_end ( BLI_Iterator * iter)

Definition at line 468 of file depsgraph_query_iter.cc.

◆ DEG_iterator_ids_next()

◆ DEG_iterator_object_is_visible()

bool DEG_iterator_object_is_visible ( eEvaluationMode eval_mode,
const Object * ob )

Returns true if the object should be visible on the given context.

Definition at line 470 of file depsgraph_query_iter.cc.

References OB_MBALL, and Object::type.

Referenced by blender::draw::foreach_obref_in_scene().

◆ DEG_iterator_objects_begin()

◆ DEG_iterator_objects_end()

void DEG_iterator_objects_end ( BLI_Iterator * iter)

Definition at line 381 of file depsgraph_query_iter.cc.

References BLI_Iterator::data, and data.

◆ DEG_iterator_objects_next()

void DEG_iterator_objects_next ( BLI_Iterator * iter)

Definition at line 361 of file depsgraph_query_iter.cc.

References BLI_Iterator::data, and data.

◆ 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 385 of file depsgraph_query.cc.

References blender::deg::GEOMETRY, blender::deg::GEOMETRY_EVAL, and 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(), BPy_GeometrySet_static_from_evaluated_object(), 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)