[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57896] trunk/blender/source/blender/ blenkernel/intern/library.c: Fix for Make Local -> All not working correct with multy-user datablocks

Sergey Sharybin sergey.vfx at gmail.com
Mon Jul 1 10:53:45 CEST 2013


Revision: 57896
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57896
Author:   nazgul
Date:     2013-07-01 08:53:45 +0000 (Mon, 01 Jul 2013)
Log Message:
-----------
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!

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/library.c

Modified: trunk/blender/source/blender/blenkernel/intern/library.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/library.c	2013-07-01 08:25:27 UTC (rev 57895)
+++ trunk/blender/source/blender/blenkernel/intern/library.c	2013-07-01 08:53:45 UTC (rev 57896)
@@ -1573,7 +1573,7 @@
 			{
 				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 */




More information about the Bf-blender-cvs mailing list