From 61d37cd47c89d57909df4025b85db39685ad220e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 1 Jul 2013 08:53:45 +0000 Subject: Fix for Make Local -> All not working correct with multy-user datablocks Make Local operator uses BKE_library_make_local function if all the datablocks needs to be made local. And this function was calling id_clear_lib_data for every datablock, which only clears library data. But this function doesn't work correct for datablocks which areshared by multiple users (this is also mentioned in comment for this function). This lead to situations when two datablocks shares the same runtime data leading to crashes later. For example making everythig local in scales cycles scene from durian ends up in a crash when toggling rig edit mode. Solved by using id_make_local instead of id_clear_lib_data, which will ensure all the data are nicely expanded and made local. Checked by Brecht, thanks fr the review! --- source/blender/blenkernel/intern/library.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/library.c') diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index c1715ada7bd..5b5d4f3c318 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1573,7 +1573,7 @@ void BKE_library_make_local(Main *bmain, Library *lib, bool untagged_only) { if (lib == NULL || id->lib == lib) { if (id->lib) { - id_clear_lib_data(bmain, id); /* sets 'id->flag' */ + id_make_local(id, false); /* why sort alphabetically here but not in * id_clear_lib_data() ? - campbell */ -- cgit v1.2.3