Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-06-17 16:27:22 +0300
committerBastien Montagne <bastien@blender.org>2020-06-17 18:06:05 +0300
commitc84fee1ffeab3842d01779f1a2e5bfd826b48e60 (patch)
tree7ac492c99cc06d433067fb1a932a0b26cd139205 /source/blender/blenkernel/intern/object.c
parentad6cccf058d0296a8741a6583d12967366a31705 (diff)
ID Duplicate: uniformize Action duplication.
Previously, object (and sub-data) actions would be controlled by the user preferences flag, collections actions would never be duplicted, and scenes actions were always duplicated... Now they all follow the user preferences settings.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 15cfe4a1d6a..28f7a9f12d0 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1771,7 +1771,7 @@ Object *BKE_object_duplicate(Main *bmain,
}
Material ***matarar;
- ID *id, *id_new;
+ ID *id, *id_new = NULL;
int a;
const bool is_object_liboverride = ID_IS_OVERRIDE_LIBRARY(ob);
@@ -1958,6 +1958,8 @@ Object *BKE_object_duplicate(Main *bmain,
/* Check if obdata is copied. */
if (duplicated_obdata) {
+ BLI_assert(id_new != NULL);
+
Key *key = BKE_key_from_object(obn);
Key *oldkey = BKE_key_from_object(ob);