From d8d4bef6ccc3556a5691e5b633ebad895a795872 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 20 Jul 2016 19:49:45 +0200 Subject: Refactor/deduplicate even more make_local code (and fix part of T48907). Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907. --- source/blender/blenkernel/BKE_material.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_material.h') diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index ddead79633f..df739996c54 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -57,7 +57,7 @@ struct Material *BKE_material_add(struct Main *bmain, const char *name); struct Material *BKE_material_copy(struct Main *bmain, struct Material *ma); struct Material *localize_material(struct Material *ma); struct Material *give_node_material(struct Material *ma); /* returns node material or self */ -void BKE_material_make_local(struct Main *bmain, struct Material *ma, const bool force_local); +void BKE_material_make_local(struct Main *bmain, struct Material *ma, const bool lib_local); /* UNUSED */ // void automatname(struct Material *); -- cgit v1.2.3