diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-02 23:45:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-02 23:45:53 +0400 |
commit | 1d2b96fa81a4d9ee82e328e144302192a3d95d3f (patch) | |
tree | 61f370122d14d8ae7442d1aa0494cd968f94b39a /source/blender/editors/space_view3d | |
parent | 3aef138175496d059ce483f9e097eaff063b7a69 (diff) |
set the view3d used layer to be an unsigned int, mask out localview layers to avoid flag mismatch when checking if it changed.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 6dc37313698..8a215834c38 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -533,16 +533,16 @@ static void view3d_recalc_used_layers(ARegion *ar, wmNotifier *wmn, Scene *scene { wmWindow *win= wmn->wm->winactive; ScrArea *sa; - int lay_used= 0; + unsigned int lay_used= 0; Base *base; if (!win) return; base= scene->base.first; while(base) { - lay_used|= base->lay; + lay_used |= base->lay & ((1<<20)-1); /* ignore localview */ - if ((lay_used & ((1<<20)-1)) == (1<<20)-1) + if (lay_used == (1<<20)-1) break; base= base->next; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 6d61123de24..24f71b8b1df 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2214,7 +2214,8 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) Base *base; Object *ob; float backcol[3]; - int retopo= 0, sculptparticle= 0, lay_used= 0; + int retopo= 0, sculptparticle= 0; + unsigned int lay_used; Object *obact = OBACT; char *grid_unit= NULL; @@ -2321,7 +2322,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) /* then draw not selected and the duplis, but skip editmode object */ for(base= scene->base.first; base; base= base->next) { - lay_used |= base->lay; + lay_used |= base->lay & ((1<<20)-1); if(v3d->lay & base->lay) { |