diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-02-11 06:16:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-02-11 06:16:22 +0300 |
commit | 4f9f42d30eb3349a6b15e16a5b25e31ca293d5c8 (patch) | |
tree | 80ab2f637944cced714ad22961a9aba9b1f67f63 | |
parent | 28c733406dd72db992cada4fe1c5191124e9c68b (diff) |
World settings ambient occlusion could be set even when its a library
making local objects with a dupligroup didnt disable the indirect flag, also made the tool respect visible and restricted flags.
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 1 | ||||
-rw-r--r-- | source/blender/src/buttons_shading.c | 4 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 18 |
3 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 94190f9753b..8dfb64d8b63 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1178,6 +1178,7 @@ void expand_local_object(Object *ob) id_lib_extern((ID *)ob->action); id_lib_extern((ID *)ob->ipo); id_lib_extern((ID *)ob->data); + id_lib_extern((ID *)ob->dup_group); for(a=0; a<ob->totcol; a++) { id_lib_extern((ID *)ob->mat[a]); diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 76a4f024f26..673f835cc49 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2145,7 +2145,9 @@ static void world_panel_amb_occ(World *wrld) block= uiNewBlock(&curarea->uiblocks, "world_panel_amb_oc", UI_EMBOSS, UI_HELV, curarea->win); uiNewPanelTabbed("Mist / Stars / Physics", "World"); if(uiNewPanel(curarea, block, "Amb Occ", "World", PANELX, PANELY, PANELW, PANELH)==0) return; - + uiSetButLock(wrld->id.lib!=0, ERROR_LIBDATA_MESSAGE); + + uiBlockSetCol(block, TH_BUT_SETTING1); uiDefButBitS(block, TOG, WO_AMB_OCC, B_REDR, "Ambient Occlusion", X2CLM1, yco-=BUTH, BUTW1, BUTH, &wrld->mode, 0, 0, 0, 0, "Toggles ambient occlusion (soft shadows)"); diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 2c49781274d..2040d8aedf6 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -4634,8 +4634,8 @@ void make_local(int mode) base= FIRSTBASE; while(base) { - ob= base->object; - if( (base->flag & SELECT)) { + if( TESTBASE(base) ) { + ob= base->object; if(ob->id.lib) { make_local_object(ob); } @@ -4646,8 +4646,8 @@ void make_local(int mode) /* maybe object pointers */ base= FIRSTBASE; while(base) { - ob= base->object; - if( (base->flag & SELECT)) { + if( TESTBASE(base) ) { + ob= base->object; if(ob->id.lib==NULL) { ID_NEW(ob->parent); ID_NEW(ob->track); @@ -4658,9 +4658,8 @@ void make_local(int mode) base= FIRSTBASE; while(base) { - ob= base->object; - if( (base->flag & SELECT) ) { - + if( TESTBASE(base) ) { + ob= base->object; id= ob->data; if(id && mode>1) { @@ -4720,9 +4719,8 @@ void make_local(int mode) if(mode>1) { base= FIRSTBASE; while(base) { - ob= base->object; - if(base->flag & SELECT ) { - + if( TESTBASE(base) ) { + ob= base->object; if(ob->type==OB_LAMP) { la= ob->data; for(b=0; b<MAX_MTEX; b++) { |