Depsgraph: Move data update tag to object->data itself
This commit is contained in:
parent
f97d036468
commit
33c97351fb
|
@ -119,7 +119,6 @@ void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx,
|
|||
/* Tagging helpers ------------------------------------------------------ */
|
||||
|
||||
void lib_id_recalc_tag(struct Main *bmain, struct ID *id);
|
||||
void lib_id_recalc_data_tag(struct Main *bmain, struct ID *id);
|
||||
|
||||
#define DEG_DEBUG_PRINTF(...) \
|
||||
do { \
|
||||
|
|
|
@ -88,12 +88,6 @@ void lib_id_recalc_tag(Main *bmain, ID *id)
|
|||
DEG_id_type_tag(bmain, GS(id->name));
|
||||
}
|
||||
|
||||
void lib_id_recalc_data_tag(Main *bmain, ID *id)
|
||||
{
|
||||
id->tag |= LIB_TAG_ID_RECALC_DATA;
|
||||
DEG_id_type_tag(bmain, GS(id->name));
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag);
|
||||
|
@ -114,8 +108,20 @@ void lib_id_recalc_tag_flag(Main *bmain, ID *id, int flag)
|
|||
if (flag & OB_RECALC_OB) {
|
||||
lib_id_recalc_tag(bmain, id);
|
||||
}
|
||||
if (flag & (OB_RECALC_DATA | PSYS_RECALC)) {
|
||||
lib_id_recalc_data_tag(bmain, id);
|
||||
if (flag & (OB_RECALC_DATA)) {
|
||||
if (GS(id->name) == ID_OB) {
|
||||
Object *object = (Object *)id;
|
||||
ID *object_data = (ID *)object->data;
|
||||
if (object_data != NULL) {
|
||||
lib_id_recalc_tag(bmain, object_data);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BLI_assert(!"Tagging non-object as object data update");
|
||||
}
|
||||
}
|
||||
if (flag & PSYS_RECALC) {
|
||||
lib_id_recalc_tag(bmain, id);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -210,8 +210,6 @@ BLI_INLINE void flush_editors_id_update(Main *bmain,
|
|||
deg_editors_id_update(update_ctx, id_cow);
|
||||
}
|
||||
lib_id_recalc_tag(bmain, id_orig);
|
||||
/* TODO(sergey): For until we've got proper data nodes in the graph. */
|
||||
lib_id_recalc_data_tag(bmain, id_orig);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue