From d1a4ae3f395a6dbb6487c5885d2327129d9b4532 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 8 Jul 2016 16:20:21 +0200 Subject: Refactor/enhance BKE_object_make_local(). Now using modern features from libquery/libremap areas. Also, it should handle much better cases where localized ID was also indirectly used by non-refcounting users (typical case: object used as modifier/constraint/whatever target from another linked object, previous code would not take those into account and just localize original object instead of making a local copy. Would result in local object used by linked one, which would be partially 'undone' on next file reload... Crappy behavior). And it fixes some obvious errors too (nullifying all proxy pointers unconditionnaly, some missing refcounted usages cases in extern_local_object(), etc.). --- source/blender/blenkernel/BKE_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_object.h') diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index f46fb73f4c9..a1f1bee2642 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -107,7 +107,7 @@ struct Object *BKE_object_lod_matob_get(struct Object *ob, struct Scene *scene); struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, bool copy_caches); struct Object *BKE_object_copy(struct Object *ob); -void BKE_object_make_local(struct Object *ob); +void BKE_object_make_local(struct Main *bmain, struct Object *ob); bool BKE_object_is_libdata(struct Object *ob); bool BKE_object_obdata_is_libdata(struct Object *ob); -- cgit v1.2.3 From 87b974caa1e2b780c8031d67a42488039036c489 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 10 Jul 2016 14:52:00 +0200 Subject: Cleanup/Refactor: pass Main pointer to all ID copy functions. Also allows us to get rid of a few _copy_ex() versions... --- source/blender/blenkernel/BKE_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_object.h') diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index a1f1bee2642..1f0dc5f1814 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -106,7 +106,7 @@ struct Object *BKE_object_lod_meshob_get(struct Object *ob, struct Scene *scene) struct Object *BKE_object_lod_matob_get(struct Object *ob, struct Scene *scene); struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, bool copy_caches); -struct Object *BKE_object_copy(struct Object *ob); +struct Object *BKE_object_copy(struct Main *bmain, struct Object *ob); void BKE_object_make_local(struct Main *bmain, struct Object *ob); bool BKE_object_is_libdata(struct Object *ob); bool BKE_object_obdata_is_libdata(struct Object *ob); -- cgit v1.2.3