diff options
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index ecc169077cd..ed7f32b938f 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -917,34 +917,9 @@ Tex *BKE_texture_localize(Tex *tex) /* ------------------------------------------------------------------------- */ -void BKE_texture_make_local(Main *bmain, Tex *tex, const bool force_local) +void BKE_texture_make_local(Main *bmain, Tex *tex, const bool lib_local) { - bool is_local = false, is_lib = false; - - /* - only lib users: do nothing (unless force_local is set) - * - only local users: set flag - * - mixed: make copy - */ - - if (!ID_IS_LINKED_DATABLOCK(tex)) { - return; - } - - BKE_library_ID_test_usages(bmain, tex, &is_local, &is_lib); - - if (force_local || is_local) { - if (!is_lib) { - id_clear_lib_data(bmain, &tex->id); - BKE_id_expand_local(&tex->id); - } - else { - Tex *tex_new = BKE_texture_copy(bmain, tex); - - tex_new->id.us = 0; - - BKE_libblock_remap(bmain, tex, tex_new, ID_REMAP_SKIP_INDIRECT_USAGE); - } - } + BKE_id_make_local_generic(bmain, &tex->id, true, lib_local); } Tex *give_current_object_texture(Object *ob) |