[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13995] trunk/blender/source/blender/src: Attempt to fix [#6757] linked objects made "local" still not editable

Campbell Barton ideasman42 at gmail.com
Fri Mar 7 00:45:28 CET 2008


Revision: 13995
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13995
Author:   campbellbarton
Date:     2008-03-07 00:45:17 +0100 (Fri, 07 Mar 2008)

Log Message:
-----------
Attempt to fix [#6757] linked objects made "local" still not editable
But not sure exactly what the user is doing.
Made game logic work on linked objects and disabled "Add Material" for linked mesh data.

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_logic.c
    trunk/blender/source/blender/src/buttons_shading.c
    trunk/blender/source/blender/src/headerbuttons.c

Modified: trunk/blender/source/blender/src/buttons_logic.c
===================================================================
--- trunk/blender/source/blender/src/buttons_logic.c	2008-03-06 22:45:11 UTC (rev 13994)
+++ trunk/blender/source/blender/src/buttons_logic.c	2008-03-06 23:45:17 UTC (rev 13995)
@@ -2591,7 +2591,7 @@
 	ob= OBACT;
 
 	if(ob==0) return;
-	uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+	uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 
 	sprintf(name, "buttonswin %d", curarea->win);
 	block= uiNewBlock(&curarea->uiblocks, name, UI_EMBOSS, UI_HELV, curarea->win);
@@ -2671,7 +2671,7 @@
 	for(a=0; a<count; a++) {
 		ob= (Object *)idar[a];
 		uiClearButLock();
-		uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+		uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 		
 		if( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
 		
@@ -2742,7 +2742,7 @@
 	for(a=0; a<count; a++) {
 		ob= (Object *)idar[a];
 		uiClearButLock();
-		uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+		uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 		if( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
 
 		/* presume it is only objects for now */
@@ -2810,7 +2810,7 @@
 	for(a=0; a<count; a++) {
 		ob= (Object *)idar[a];
 		uiClearButLock();
-		uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+		uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
 		if( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
 
 		/* presume it is only objects for now */

Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c	2008-03-06 22:45:11 UTC (rev 13994)
+++ trunk/blender/source/blender/src/buttons_shading.c	2008-03-06 23:45:17 UTC (rev 13995)
@@ -3921,14 +3921,14 @@
 	uiNewPanelTabbed("Material", "Material");
 	if(uiNewPanel(curarea, block, "Ramps", "Material", 640, 0, 318, 204)==0) return;
 	
-	uiSetButLock(ma->id.lib!=NULL, ERROR_LIBDATA_MESSAGE);
-	
 	uiBlockBeginAlign(block);
 	uiBlockSetCol(block, TH_BUT_SETTING1);
 	uiDefButS(block, ROW, B_REDR, "Show Col Ramp",10,180,150,20, &ma->ramp_show, 0, 0, 0, 0, "Show ramp buttons for material diffuse color");
 	uiDefButS(block, ROW, B_REDR, "Show Spec Ramp",160,180,150,20, &ma->ramp_show, 0, 1, 0, 0, "Show ramp buttons for material specular color");
 	uiBlockSetCol(block, TH_AUTO);
 	
+	uiSetButLock(ma->id.lib!=NULL, ERROR_LIBDATA_MESSAGE);
+	
 	/* COLORBAND */
 	uiBlockBeginAlign(block);
 	uiDefButBitI(block, TOG, ma->ramp_show?MA_RAMP_SPEC:MA_RAMP_COL, B_MATCOLORBAND, "Colorband",10,145,80,20, &ma->mode, 0, 0, 0, 0, "Toggles colorband ramp operations");
@@ -4166,6 +4166,7 @@
 	}
 	
 	uiBlockSetCol(block, TH_BUT_ACTION);
+	uiClearButLock();
 	uiDefButBitS(block, TOG, 1<<(ob->actcol-1), B_MATFROM, "OB",	125,135,32,20, &ob->colbits, 0, 0, 0, 0, "Links material to object");
 	idn= ob->data;
 	strncpy(str, idn->name, 2);

Modified: trunk/blender/source/blender/src/headerbuttons.c
===================================================================
--- trunk/blender/source/blender/src/headerbuttons.c	2008-03-06 22:45:11 UTC (rev 13994)
+++ trunk/blender/source/blender/src/headerbuttons.c	2008-03-06 23:45:17 UTC (rev 13995)
@@ -391,6 +391,7 @@
 	}
 	else if(add_addbutton) {	/* "add new" button */
 		uiBlockSetCol(block, oldcol);
+		if(parid) uiSetButLock(parid->lib!=0, ERROR_LIBDATA_MESSAGE);
 		uiDefButS(block, TOG, browse, "Add New" ,xco, yco, 110, YIC, menupoin, (float)*menupoin, 32767.0, 0, 0, "Add new data block");
 		xco+= 110;
 	}





More information about the Bf-blender-cvs mailing list