64 void depsgraph_geometry_tag_to_component(
const ID *
id,
NodeType *component_type)
72 bool is_selectable_data_id_type(
const ID_Type id_type)
77 void depsgraph_select_tag_to_component_opcode(
const ID *
id,
94 else if (id_type ==
ID_OB) {
98 else if (id_type ==
ID_MC) {
102 else if (is_selectable_data_id_type(id_type)) {
112 void depsgraph_base_flags_tag_to_component_opcode(
const ID *
id,
121 else if (id_type ==
ID_OB) {
135 void depsgraph_tag_to_component_opcode(
const ID *
id,
154 depsgraph_geometry_tag_to_component(
id, component_type);
163 if (id_type ==
ID_PA) {
170 *operation_code = psysTagToOperationCode(tag);
183 depsgraph_select_tag_to_component_opcode(
id, component_type, operation_code);
186 depsgraph_base_flags_tag_to_component_opcode(
id, component_type, operation_code);
226 void id_tag_update_ntree_special(
230 if (
ntree ==
nullptr) {
242 update_ctx.
bmain = bmain;
252 if (cow_comp ==
nullptr) {
256 cow_comp->tag_update(
graph, update_source);
269 if (component_node ==
nullptr) {
272 depsgraph_id_tag_copy_on_write(
graph,
id_node, update_source);
277 component_node->tag_update(
graph, update_source);
280 OperationNode *operation_node = component_node->find_operation(operation_code);
281 if (operation_node !=
nullptr) {
282 operation_node->tag_update(
graph, update_source);
286 if (component_node->need_tag_cow_before_update()) {
287 depsgraph_id_tag_copy_on_write(
graph,
id_node, update_source);
299 void deg_graph_id_tag_legacy_compat(
307 if (data_id !=
nullptr) {
319 if (key_id !=
nullptr) {
329 if (key_id !=
nullptr) {
339 if (key_id !=
nullptr) {
351 void graph_id_tag_update_single_flag(
Main *bmain,
360 depsgraph_update_editors_tag(bmain,
graph,
id);
367 depsgraph_tag_to_component_opcode(
id, tag, &component_type, &operation_code);
389 depsgraph_tag_component(
graph,
id_node, component_type, operation_code, update_source);
393 deg_graph_id_tag_legacy_compat(bmain,
graph,
id, tag, update_source);
399 if (tag_name ==
nullptr) {
410 string stringify_update_bitfield(
int flag)
416 int current_flag = flag;
423 while (current_flag != 0) {
446 int deg_recalc_flags_for_legacy_zero()
454 if (
graph !=
nullptr) {
460 return deg_recalc_flags_for_legacy_zero();
470 void deg_graph_node_tag_zero(
Main *bmain,
490 comp_node->tag_update(
graph, update_source);
492 deg_graph_id_tag_legacy_compat(bmain,
graph,
id, (
IDRecalcFlag)0, update_source);
495 void graph_tag_on_visible_update(
Depsgraph *
graph,
const bool do_time)
544 if (id_type ==
ID_OB) {
574 switch (object->
type) {
626 id->recalc_after_undo_push |= deg_recalc_flags_effective(
nullptr, flag);
635 printf(
"ID tagged for update during dependency graph evaluation.\n");
640 printf(
"%s: id=%s flags=%s source=%s\n",
643 stringify_update_bitfield(flag).c_str(),
644 update_source_as_string(update_source));
647 if (
graph !=
nullptr) {
651 deg_graph_node_tag_zero(bmain,
graph,
id_node, update_source);
666 id->recalc |= deg_recalc_flags_effective(
graph, flag);
668 int current_flag = flag;
669 while (current_flag != 0) {
671 graph_id_tag_update_single_flag(bmain,
graph,
id,
id_node, tag, update_source);
674 id_tag_update_ntree_special(bmain,
graph,
id, flag, update_source);
680 graph_id_tag_update_single_flag(
695 return "GEOMETRY_ALL_MODES";
709 return "COPY_ON_WRITE";
717 return "POINT_CACHE";
721 return "SEQUENCER_STRIPS";
723 return "FRAME_CHANGE";
727 return "AUDIO_VOLUME";
731 return "AUDIO_LISTENER";
741 return "TAG_FOR_UNDO";
743 return "ID_RECALC_NTREE_OUTPUT";
788 if (id_type ==
ID_NT) {
813 deg::graph_tag_on_visible_update(
graph, do_time);
819 deg::graph_tag_on_visible_update(
depsgraph, do_time);
826 graph->use_editors_update =
true;
832 if (!
graph->use_editors_update) {
842 update_ctx.
bmain = bmain;
876 id_node->is_user_modified =
false;
877 id_node->is_cow_explicitly_tagged =
false;
892 id_node->id_cow_recalc_backup = 0;
struct AnimData * BKE_animdata_from_id(const struct ID *id)
int BKE_idtype_idcode_to_index(short idcode)
struct bNodeTree * ntreeFromID(struct ID *id)
#define BLI_assert_msg(a, msg)
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_GEOMETRY_ALL_MODES
@ 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_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_id_tag_update_ex(Main *bmain, ID *id, int flag)
void DEG_tag_on_visible_update(Main *bmain, const bool do_time)
void DEG_graph_tag_on_visible_update(Depsgraph *depsgraph, const bool do_time)
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)
void graph_tag_ids_for_visible_update(Depsgraph *graph)
@ 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
IDNode * find_id_node(const ID *id) const
char id_type_updated[INDEX_ID_MAX]
bool need_tag_id_on_graph_visibility_time_update
bool need_tag_id_on_graph_visibility_update
IDComponentsMask previously_visible_components_mask
bool is_cow_explicitly_tagged
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