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 <montagne29@wanadoo.fr>2016-05-13 13:54:09 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-05-13 15:12:10 +0300
commit5e0ec49570fa745c28bd028cb7796733a1d9dfce (patch)
tree67c920a9e00748d05a06cb770b027e685de50266 /source/blender/blenkernel/intern/library.c
parent6276726bc4594f61753e51b8e877cf3c5018c808 (diff)
Fix T48416: Impossible to append from another file without localizing also all indirectly linked data.
Previous to 2.77, this used to be default behavior, was changed in rB591f4549c958b. However, in most append cases, you do want a full localization of your data, so this new behavior is kept by default, but there is now an option in append operator to only localize the 'first level' of data (i.e. datablocks from linked library itself, and not those from other 'sub-libraries').
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 9e81cded9f5..0a681a75f84 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1830,9 +1830,14 @@ static void lib_indirect_test_id(ID *id, Library *lib)
#undef LIBTAG
}
-/* if lib!=NULL, only all from lib local
- * bmain is almost certainly G.main */
-void BKE_library_make_local(Main *bmain, Library *lib, bool untagged_only, bool set_fake)
+/** Make linked datablocks local.
+ *
+ * \param bmain Almost certainly G.main.
+ * \param lib If not NULL, only make local datablocks from this library.
+ * \param untagged_only If true, only make local datablocks not tagged with LIB_TAG_PRE_EXISTING.
+ * \param set_fake If true, set fake user on all localized datablocks (except group and objects ones).
+ */
+void BKE_library_make_local(Main *bmain, const Library *lib, const bool untagged_only, const bool set_fake)
{
ListBase *lbarray[MAX_LIBARRAY];
ID *id, *idn;