[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18705] trunk/blender/source/blender/src/ buttons_editing.c: Fix for bug #18087: Editing of object name and modifiers did not

Brecht Van Lommel brecht at blender.org
Tue Jan 27 23:09:24 CET 2009


Revision: 18705
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18705
Author:   blendix
Date:     2009-01-27 23:09:23 +0100 (Tue, 27 Jan 2009)

Log Message:
-----------
Fix for bug #18087: Editing of object name and modifiers did not
work in editing buttons if the object data was linked.

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_editing.c

Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c	2009-01-27 21:26:31 UTC (rev 18704)
+++ trunk/blender/source/blender/src/buttons_editing.c	2009-01-27 22:09:23 UTC (rev 18705)
@@ -1944,13 +1944,14 @@
 				uiButSetFunc(but, modifiers_applyModifier, ob, md);
 			}
 			
+			uiClearButLock();
+			uiSetButLock(ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
+
 			if (md->type!=eModifierType_Fluidsim && md->type!=eModifierType_Softbody && md->type!=eModifierType_ParticleSystem && (md->type!=eModifierType_Cloth)) {
 				but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Copy",	lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Duplicate the current modifier at the same position in the stack");
 				uiButSetFunc(but, modifiers_copyModifier, ob, md);
 			}
 			uiBlockEndAlign(block);
-			
-			uiSetButLock(ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
 		}
 
 		lx = x + 10;
@@ -5525,7 +5526,6 @@
 		uiBlockSetCol(block, TH_AUTO);
 	}
 	if(ob) {
-		uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 		but = uiDefBut(block, TEX, B_IDNAME, "OB:",	xco, 180, 454-xco, YIC, ob->id.name+2, 0.0, 21.0, 0, 0, "Active Object name.");
 #ifdef WITH_VERSE
 		if(ob->vnode) uiButSetFunc(but, test_and_send_idbutton_cb, ob, ob->id.name);
@@ -5534,6 +5534,7 @@
 		uiButSetFunc(but, test_idbutton_cb, ob->id.name, NULL);
 #endif
 
+		uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 	}
 
 	/* empty display handling, note it returns! */





More information about the Bf-blender-cvs mailing list