From ac75e37c8e1291f8a46ebed89fd2f99ad68c7aff Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 11 Nov 2024 14:57:29 +0100 Subject: [PATCH] Fix #130113: Copying Object ID never copies its preview. This was added 7 years ago as 'safe' preservation of previous behavior, when ID copying was refactored and more control was added over its behavior. However, it was never removed since then, even though `NO_PREVIEW` flag has been part of the `LOCALIZE` copying behavior since many years. So time to remove this enforced bahevior and use the API as designed. If this causes new issues, they will have to be fixed in code calling the ID copy API (most likely by simply adding the `NO_PREVIEW` flag to the copy options). --- source/blender/blenkernel/intern/object.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index a6d5bdfccb0..7d27882eebf 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -262,9 +262,7 @@ static void object_copy_data(Main *bmain, ob_dst->avs = ob_src->avs; ob_dst->mpath = animviz_copy_motionpath(ob_src->mpath); - /* Do not copy object's preview - * (mostly due to the fact renderers create temp copy of objects). */ - if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0 && false) { /* XXX TODO: temp hack. */ + if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0) { BKE_previewimg_id_copy(&ob_dst->id, &ob_src->id); } else {