Memfile Undo: aslo tag embedded IDs for update.
This is again in the fuzzy area of how embedded IDs are handled respectively by partial undo code and depsgraph... Should not be necessary currently, but better be safe and explicit, and also tag those embeded IDs from re-used owner ID.
This commit is contained in:
parent
7561e3dad0
commit
7dd7849ddd
|
@ -224,9 +224,21 @@ static void memfile_undosys_step_decode(struct bContext *C,
|
|||
|
||||
/* Tag depsgraph to update data-block for changes that happened between the
|
||||
* current and the target state, see direct_link_id_restore_recalc(). */
|
||||
if (id->recalc) {
|
||||
if (id->recalc != 0) {
|
||||
DEG_id_tag_update_ex(bmain, id, id->recalc);
|
||||
}
|
||||
|
||||
bNodeTree *nodetree = ntreeFromID(id);
|
||||
if (nodetree != NULL && nodetree->id.recalc != 0) {
|
||||
DEG_id_tag_update_ex(bmain, &nodetree->id, nodetree->id.recalc);
|
||||
}
|
||||
if (GS(id->name) == ID_SCE) {
|
||||
Scene *scene = (Scene *)id;
|
||||
if (scene->master_collection != NULL && scene->master_collection->id.recalc != 0) {
|
||||
DEG_id_tag_update_ex(
|
||||
bmain, &scene->master_collection->id, scene->master_collection->id.recalc);
|
||||
}
|
||||
}
|
||||
}
|
||||
FOREACH_MAIN_ID_END;
|
||||
|
||||
|
|
Loading…
Reference in New Issue