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>2022-02-04 17:34:30 +0300
committerBastien Montagne <bastien@blender.org>2022-02-04 17:35:51 +0300
commit0b0f4829e154c8f95e1d9917bf1d630aac962cee (patch)
tree7cb07c421518212290c7782da8c372111e00347c /source/blender/blenkernel/intern/object.cc
parent4eb10e414b1d521577d1e12f303d1b9e204b695c (diff)
Cleanup: Removed Object type specific 'make_local' callback.
This callback was only needed to allow specific handling of proxies, now that theses have been removed the generic `BKE_lib_id_make_local_generic` code works for objects as well.
Diffstat (limited to 'source/blender/blenkernel/intern/object.cc')
-rw-r--r--source/blender/blenkernel/intern/object.cc31
1 files changed, 1 insertions, 30 deletions
diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc
index df7dce51672..04d60c096f2 100644
--- a/source/blender/blenkernel/intern/object.cc
+++ b/source/blender/blenkernel/intern/object.cc
@@ -325,35 +325,6 @@ static void object_free_data(ID *id)
BKE_previewimg_free(&ob->preview);
}
-static void object_make_local(Main *bmain, ID *id, const int flags)
-{
- if (!ID_IS_LINKED(id)) {
- return;
- }
-
- Object *ob = (Object *)id;
- const bool lib_local = (flags & LIB_ID_MAKELOCAL_FULL_LIBRARY) != 0;
-
- bool force_local, force_copy;
- BKE_lib_id_make_local_generic_action_define(bmain, id, flags, &force_local, &force_copy);
-
- if (force_local) {
- BKE_lib_id_clear_library_data(bmain, &ob->id, flags);
- BKE_lib_id_expand_local(bmain, &ob->id, flags);
- }
- else if (force_copy) {
- Object *ob_new = (Object *)BKE_id_copy(bmain, &ob->id);
- id_us_min(&ob_new->id);
-
- /* setting newid is mandatory for complex make_lib_local logic... */
- ID_NEW_SET(ob, ob_new);
-
- if (!lib_local) {
- BKE_libblock_remap(bmain, ob, ob_new, ID_REMAP_SKIP_INDIRECT_USAGE);
- }
- }
-}
-
static void library_foreach_modifiersForeachIDLink(void *user_data,
Object *UNUSED(object),
ID **id_pointer,
@@ -1263,7 +1234,7 @@ IDTypeInfo IDType_ID_OB = {
/* init_data */ object_init_data,
/* copy_data */ object_copy_data,
/* free_data */ object_free_data,
- /* make_local */ object_make_local,
+ /* make_local */ nullptr,
/* foreach_id */ object_foreach_id,
/* foreach_cache */ nullptr,
/* foreach_path */ object_foreach_path,