80 void depsgraph_geometry_tag_to_component(
const ID *
id,
NodeType *component_type)
88 bool is_selectable_data_id_type(
const ID_Type id_type)
93 void depsgraph_select_tag_to_component_opcode(
const ID *
id,
110 else if (id_type ==
ID_OB) {
114 else if (id_type ==
ID_MC) {
118 else if (is_selectable_data_id_type(id_type)) {
128 void depsgraph_base_flags_tag_to_component_opcode(
const ID *
id,
137 else if (id_type ==
ID_OB) {
151 void depsgraph_tag_to_component_opcode(
const ID *
id,
170 depsgraph_geometry_tag_to_component(
id, component_type);
179 if (id_type ==
ID_PA) {
186 *operation_code = psysTagToOperationCode(tag);
196 if (id_type ==
ID_NT) {
204 depsgraph_select_tag_to_component_opcode(
id, component_type, operation_code);
207 depsgraph_base_flags_tag_to_component_opcode(
id, component_type, operation_code);
242 void id_tag_update_ntree_special(
246 if (
ntree ==
nullptr) {
258 update_ctx.
bmain = bmain;
268 if (cow_comp ==
nullptr) {
272 cow_comp->tag_update(
graph, update_source);
285 if (component_node ==
nullptr) {
287 depsgraph_id_tag_copy_on_write(
graph,
id_node, update_source);
292 component_node->tag_update(
graph, update_source);
295 OperationNode *operation_node = component_node->find_operation(operation_code);
296 if (operation_node !=
nullptr) {
297 operation_node->tag_update(
graph, update_source);
301 if (component_node->need_tag_cow_before_update()) {
302 depsgraph_id_tag_copy_on_write(
graph,
id_node, update_source);
311 void deg_graph_id_tag_legacy_compat(
319 if (data_id !=
nullptr) {
331 if (key_id !=
nullptr) {
341 if (key_id !=
nullptr) {
351 if (key_id !=
nullptr) {
363 void graph_id_tag_update_single_flag(
Main *bmain,
372 depsgraph_update_editors_tag(bmain,
graph,
id);
379 depsgraph_tag_to_component_opcode(
id, tag, &component_type, &operation_code);
401 depsgraph_tag_component(
graph,
id_node, component_type, operation_code, update_source);
405 deg_graph_id_tag_legacy_compat(bmain,
graph,
id, tag, update_source);
411 if (tag_name ==
nullptr) {
422 string stringify_update_bitfield(
int flag)
428 int current_flag = flag;
435 while (current_flag != 0) {
458 int deg_recalc_flags_for_legacy_zero()
466 if (
graph !=
nullptr) {
472 return deg_recalc_flags_for_legacy_zero();
482 void deg_graph_node_tag_zero(
Main *bmain,
498 comp_node->tag_update(
graph, update_source);
500 deg_graph_id_tag_legacy_compat(bmain,
graph,
id, (
IDRecalcFlag)0, update_source);
510 if (id_type ==
ID_OB) {
512 if (object_orig->
proxy !=
nullptr) {
543 if (id_type ==
ID_OB) {
572 switch (object->
type) {
624 id->recalc_after_undo_push |= deg_recalc_flags_effective(
nullptr, flag);
633 printf(
"ID tagged for update during dependency graph evaluation.");
638 printf(
"%s: id=%s flags=%s source=%s\n",
641 stringify_update_bitfield(flag).c_str(),
642 update_source_as_string(update_source));
645 if (
graph !=
nullptr) {
649 deg_graph_node_tag_zero(bmain,
graph,
id_node, update_source);
664 id->recalc |= deg_recalc_flags_effective(
graph, flag);
666 int current_flag = flag;
667 while (current_flag != 0) {
669 graph_id_tag_update_single_flag(bmain,
graph,
id,
id_node, tag, update_source);
672 id_tag_update_ntree_special(bmain,
graph,
id, flag, update_source);
678 graph_id_tag_update_single_flag(
705 return "COPY_ON_WRITE";
713 return "POINT_CACHE";
717 return "SEQUENCER_STRIPS";
723 return "AUDIO_VOLUME";
727 return "AUDIO_LISTENER";
737 return "TAG_FOR_UNDO";
784 if (id_type ==
ID_NT) {
810 deg::deg_graph_on_visible_update(bmain,
graph, do_time);
823 graph->use_editors_update =
true;
831 if (!
graph->use_editors_update) {
841 update_ctx.
bmain = bmain;
875 id_node->is_user_modified =
false;
890 id_node->id_cow_recalc_backup = 0;
struct AnimData * BKE_animdata_from_id(struct ID *id)
int BKE_idtype_idcode_to_index(const short idcode)
struct bNodeTree * ntreeFromID(struct ID *id)
MINLINE int bitscan_forward_clear_i(int *a)
struct Depsgraph Depsgraph
int DEG_debug_flags_get(const struct Depsgraph *depsgraph)
struct Scene * DEG_get_input_scene(const Depsgraph *graph)
bool DEG_id_type_any_updated(const struct Depsgraph *depsgraph)
struct Main * DEG_get_bmain(const Depsgraph *graph)
struct ViewLayer * DEG_get_input_view_layer(const Depsgraph *graph)
@ ID_RECALC_AUDIO_LISTENER
@ ID_RECALC_COPY_ON_WRITE
@ ID_RECALC_SEQUENCER_STRIPS
Object is a sort of wrapper for general info.
const Depsgraph * depsgraph
void DEG_id_type_tag(Main *bmain, short id_type)
const char * DEG_update_tag_as_string(IDRecalcFlag flag)
void DEG_editors_update(Depsgraph *depsgraph, bool time)
void DEG_id_tag_update(ID *id, int flag)
void DEG_enable_editors_update(Depsgraph *depsgraph)
void DEG_graph_on_visible_update(Main *bmain, Depsgraph *depsgraph, const bool do_time)
void DEG_ids_clear_recalc(Depsgraph *depsgraph, const bool backup)
void DEG_graph_id_tag_update(struct Main *bmain, struct Depsgraph *depsgraph, struct ID *id, int flag)
void DEG_graph_time_tag_update(struct Depsgraph *depsgraph)
void DEG_time_tag_update(struct Main *bmain)
void DEG_on_visible_update(Main *bmain, const bool do_time)
void DEG_id_tag_update_ex(Main *bmain, ID *id, int flag)
void DEG_graph_id_type_tag(Depsgraph *depsgraph, short id_type)
void DEG_ids_restore_recalc(Depsgraph *depsgraph)
static void deg_graph_clear_id_recalc_flags(ID *id)
Span< Depsgraph * > get_all_registered_graphs(Main *bmain)
NodeType geometry_tag_to_component(const ID *id)
void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, ID *id)
void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx, bool updated)
void id_tag_update(Main *bmain, ID *id, int flag, eUpdateSource update_source)
bool deg_copy_on_write_is_needed(const ID *id_orig)
@ OBJECT_FROM_LAYER_ENTRY
@ PARTICLE_SETTINGS_RESET
@ MOVIECLIP_SELECT_UPDATE
DepsNodeFactory * type_get_factory(const NodeType type)
bool deg_copy_on_write_is_expanded(const ID *id_cow)
void graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag, eUpdateSource update_source)
@ DEG_UPDATE_SOURCE_USER_EDIT
@ DEG_UPDATE_SOURCE_RELATIONS
@ DEG_UPDATE_SOURCE_VISIBILITY
struct Depsgraph * depsgraph
struct ViewLayer * view_layer
struct Object * proxy_from
IDNode * find_id_node(const ID *id) const
char id_type_updated[INDEX_ID_MAX]
IDComponentsMask previously_visible_components_mask
IDComponentsMask visible_components_mask
Map< ComponentIDKey, ComponentNode * > components
ComponentNode * find_component(NodeType type, const char *name="") const
virtual void tag_update(Depsgraph *graph, eUpdateSource source) override