From eb7f2457e589e1a071b2e3f45e1dd9f4ac1d62ed Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 13 Feb 2019 14:29:27 +0100 Subject: Cleanup: do not cleanup runtime data twice during ID copying... More or less same code was being executed twice during ID copying. Makes no sense to add yet another switch-by-ID-type to handle specificaly runtime data during ID copying, we already have BKE_xxx_copy_data() functions for that. --- source/blender/blenkernel/intern/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/object.c') diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index fe04fa6172f..91ecc8dd74a 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1323,7 +1323,7 @@ void BKE_object_copy_data(Main *bmain, Object *ob_dst, const Object *ob_src, con ShaderFxData *fx; /* Do not copy runtime data. */ - BKE_object_runtime_reset(ob_dst); + BKE_object_runtime_reset_on_copy(ob_dst, flag); /* We never handle usercount here for own data. */ const int flag_subdata = flag | LIB_ID_CREATE_NO_USER_REFCOUNT; @@ -3555,7 +3555,7 @@ void BKE_object_runtime_reset(Object *object) } /* Reset all pointers which we don't want to be shared when copying the object. */ -void BKE_object_runtime_reset_on_copy(Object *object) +void BKE_object_runtime_reset_on_copy(Object *object, const int UNUSED(flag)) { Object_Runtime *runtime = &object->runtime; runtime->mesh_eval = NULL; -- cgit v1.2.3