diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-07 02:45:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-07 02:45:17 +0300 |
commit | 26c45844ac213ac9c768e7e1ede0c4d30ed0425a (patch) | |
tree | 5f26c5b2b1ba1eb64f8b0e0e33779fc40a2b9c8b | |
parent | 955e1b7ba0300035d0a2f64847d4554dec1a2db4 (diff) |
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.
-rw-r--r-- | source/blender/src/buttons_logic.c | 8 | ||||
-rw-r--r-- | source/blender/src/buttons_shading.c | 5 | ||||
-rw-r--r-- | source/blender/src/headerbuttons.c | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 819f7bbaa24..6b69a4a8da7 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -2591,7 +2591,7 @@ void logic_buts(void) 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 @@ void logic_buts(void) 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 @@ void logic_buts(void) 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 @@ void logic_buts(void) 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 */ 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); diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index d2d3a3352b7..dde5a512de9 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -391,6 +391,7 @@ int std_libbuttons(uiBlock *block, short xco, short yco, } 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; } |