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.
This commit is contained in:
Campbell Barton 2008-02-11 03:16:22 +00:00
parent 28c733406d
commit 4f9f42d30e
3 changed files with 12 additions and 11 deletions

@ -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]);

@ -2145,6 +2145,8 @@ 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",

@ -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++) {