diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 96c7339c6da..53c22b7ce9b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2845,11 +2845,11 @@ static int direct_link_id_restore_recalc(const FileData *fd, * that we need to perform again. */ if (fd->undo_direction < 0) { /* Undo: tags from target to the current state. */ - recalc |= id_current->recalc_undo_accumulated; + recalc |= id_current->recalc_up_to_undo_push; } else { /* Redo: tags from current to the target state. */ - recalc |= id_target->recalc_undo_accumulated; + recalc |= id_target->recalc_up_to_undo_push; } } @@ -2880,11 +2880,11 @@ static void direct_link_id_common(FileData *fd, ID *id, ID *id_old, const int ta * the version the file has been saved with. */ if (fd->memfile == NULL) { id->recalc = 0; - id->recalc_undo_accumulated = 0; + id->recalc_after_undo_push = 0; } else if ((fd->skip_flags & BLO_READ_SKIP_UNDO_OLD_MAIN) == 0) { id->recalc = direct_link_id_restore_recalc(fd, id, id_old, false); - id->recalc_undo_accumulated = 0; + id->recalc_after_undo_push = 0; } /* Link direct data of overrides. */ @@ -3834,20 +3834,11 @@ typedef struct tConstraintLinkData { /* callback function used to relink constraint ID-links */ static void lib_link_constraint_cb(bConstraint *UNUSED(con), ID **idpoin, - bool is_reference, + bool UNUSED(is_reference), void *userdata) { tConstraintLinkData *cld = (tConstraintLinkData *)userdata; - - /* for reference types, we need to increment the user-counts on load... */ - if (is_reference) { - /* reference type - with usercount */ - *idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin); - } - else { - /* target type - no usercount needed */ - *idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin); - } + *idpoin = newlibadr(cld->fd, cld->id->lib, *idpoin); } static void lib_link_constraints(FileData *fd, ID *id, ListBase *conlist) @@ -9579,7 +9570,7 @@ static void read_libblock_undo_restore_identical( /* Recalc flags, mostly these just remain as they are. */ id_old->recalc |= direct_link_id_restore_recalc_exceptions(id_old); - id_old->recalc_undo_accumulated = 0; + id_old->recalc_after_undo_push = 0; /* As usual, proxies require some special love... * In `blo_clear_proxy_pointers_from_lib()` we clear all `proxy_from` pointers to local IDs, for |