From 26c45844ac213ac9c768e7e1ede0c4d30ed0425a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Mar 2008 23:45:17 +0000 Subject: 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. --- source/blender/src/buttons_shading.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/src/buttons_shading.c') diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index bcd6ffb1aef..b0d840433d2 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -3921,14 +3921,14 @@ static void material_panel_ramps(Material *ma) 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 @@ static void material_panel_links(Object *ob, Material *ma) } 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); -- cgit v1.2.3