Fix #118276: IDs were remapped by mistake when copying in the VSE

All IDs in the current bmain were remapped while it should have only
been done for IDs in the dummy scene created for the copy operation.
This commit is contained in:
Sebastian Parborg
2024-02-15 16:23:57 +01:00
parent 49faea5f36
commit 8a388a39ea

View File

@@ -188,7 +188,11 @@ static bool sequencer_write_copy_paste_file(Main *bmain_src,
BKE_library_foreach_ID_link(
bmain_src, &scene_dst->id, gather_strip_data_ids_to_null, &id_remapper, IDWALK_RECURSE);
BKE_libblock_remap_multiple(bmain_src, id_remapper, 0);
BKE_libblock_relink_multiple(bmain_src,
{&scene_dst->id},
ID_REMAP_TYPE_REMAP,
id_remapper,
(ID_REMAP_SKIP_USER_CLEAR | ID_REMAP_SKIP_USER_REFCOUNT));
/* Ensure that there are no old copy tags around */
BKE_blendfile_write_partial_begin(bmain_src);
@@ -394,3 +398,4 @@ int sequencer_clipboard_paste_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}