diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-23 02:08:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-23 02:08:19 +0400 |
commit | 94ad8c810c1699188f4c54a9307af31fc5fd9e7a (patch) | |
tree | 1383cf6f4649cf29ecc7753f74fe899fd3bf65e1 /source/blender/src/editview.c | |
parent | 1c52e2cfa4096f3775472bd11d5ac982edc5ae3a (diff) |
Changed TESTBASE and TESTBASE_LIB to check the hidden flag
Checked every instance of testbase to see this dosnt break anything, also changed TESTBASE and TESTBASELIB, both were used incorrectly in places.
added error_libdata() for library error messages that are everywhere.
added object_data_is_libdata to test if the object and its data's are from a library.
fixed 2 crashs in adding Curve points to a library object (remember to check, verify_ipocurve returns NULL!)
made duplicating and making dupli's real for lib objects possible, disabled joining into lib armatures and meshes.
Diffstat (limited to 'source/blender/src/editview.c')
-rw-r--r-- | source/blender/src/editview.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index aacb083e98a..232a69979bd 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -909,7 +909,10 @@ void deselectall(void) /* is toggle */ break; } /* are there any objects in the view*/ - if(base->lay & G.vd->lay) + if(base->lay & G.vd->lay && + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 && + (base->object->restrictflag & OB_RESTRICT_SELECT)==0 + ) ok=1; base= base->next; @@ -919,7 +922,10 @@ void deselectall(void) /* is toggle */ base= FIRSTBASE; while(base) { - if(base->lay & G.vd->lay) { + if(base->lay & G.vd->lay && + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 && + (base->object->restrictflag & OB_RESTRICT_SELECT)==0 + ) { if(a) select_base_v3d(base, BA_DESELECT); else @@ -943,7 +949,9 @@ void selectswap(void) Base *base; for(base= FIRSTBASE; base; base= base->next) { - if(base->lay & G.vd->lay) { + if(base->lay & G.vd->lay && + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 + ) { if TESTBASE(base) select_base_v3d(base, BA_DESELECT); else @@ -968,7 +976,10 @@ void selectall_type(short obtype) base= FIRSTBASE; while(base) { - if((base->lay & G.vd->lay) && (base->object->type == obtype)) { + if((base->lay & G.vd->lay) && + (base->object->type == obtype) && + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 + ) { select_base_v3d(base, BA_SELECT); base->object->flag= base->flag; } @@ -989,7 +1000,9 @@ void selectall_layer(unsigned int layernum) base= FIRSTBASE; while(base) { - if (base->lay == (1<< (layernum -1))) { + if(base->lay == (1<< (layernum -1)) && + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 + ) { select_base_v3d(base, BA_SELECT); base->object->flag= base->flag; } @@ -1142,7 +1155,8 @@ static void select_all_from_groups(Base *basact) for(go= group->gobject.first; go; go= go->next) { if(deselect) go->ob->flag &= ~SELECT; else { - if (!(go->ob->restrictflag & OB_RESTRICT_SELECT)) + if ((go->ob->restrictflag & OB_RESTRICT_SELECT)==0 && + (go->ob->restrictflag & OB_RESTRICT_VIEW)==0) go->ob->flag |= SELECT; } } @@ -1169,7 +1183,10 @@ static Base *mouse_select_menu(unsigned int *buffer, int hits, short *mval) char str[32]; for(base=FIRSTBASE; base; base= base->next) { - if(base->lay & G.vd->lay) { + if(base->lay & G.vd->lay && + (base->object->restrictflag & OB_RESTRICT_SELECT)==0 && + (base->object->restrictflag & OB_RESTRICT_VIEW)==0 + ) { baseList[baseCount] = NULL; /* two selection methods, the CTRL select uses max dist of 15 */ |