diff options
Diffstat (limited to 'source/blender/editors/mesh/editface.c')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index c453284a617..899f1924222 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -65,7 +65,7 @@ void paintface_flush_flags(Object *ob, short flag) const int *index_array = NULL; int totpoly; int i; - + BLI_assert((flag & ~(SELECT | ME_HIDE)) == 0); if (me == NULL) @@ -110,7 +110,7 @@ void paintface_hide(Object *ob, const bool unselected) Mesh *me; MPoly *mpoly; int a; - + me = BKE_mesh_from_object(ob); if (me == NULL || me->totpoly == 0) return; @@ -126,10 +126,10 @@ void paintface_hide(Object *ob, const bool unselected) if (mpoly->flag & ME_HIDE) { mpoly->flag &= ~ME_FACE_SEL; } - + mpoly++; } - + BKE_mesh_flush_hidden_from_polys(me); paintface_flush_flags(ob, SELECT | ME_HIDE); @@ -262,7 +262,7 @@ void paintface_deselect_all_visible(Object *ob, int action, bool flush_flags) me = BKE_mesh_from_object(ob); if (me == NULL) return; - + if (action == SEL_TOGGLE) { action = SEL_SELECT; @@ -315,7 +315,7 @@ bool paintface_minmax(Object *ob, float r_min[3], float r_max[3]) if (!me || !me->mloopuv) { return ok; } - + copy_m3_m4(bmat, ob->obmat); mvert = me->mvert; @@ -342,19 +342,19 @@ bool paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], b Mesh *me; MPoly *mpoly, *mpoly_sel; unsigned int a, index; - + /* Get the face under the cursor */ me = BKE_mesh_from_object(ob); if (!ED_mesh_pick_face(C, ob, mval, &index, ED_MESH_PICK_DEFAULT_FACE_SIZE)) return false; - + if (index >= me->totpoly) return false; mpoly_sel = me->mpoly + index; if (mpoly_sel->flag & ME_HIDE) return false; - + /* clear flags */ mpoly = me->mpoly; a = me->totpoly; @@ -364,7 +364,7 @@ bool paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], b mpoly++; } } - + me->act_face = (int)index; if (extend) { @@ -382,9 +382,9 @@ bool paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], b else { mpoly_sel->flag |= ME_FACE_SEL; } - + /* image window redraw */ - + paintface_flush_flags(ob, SELECT); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); ED_region_tag_redraw(CTX_wm_region(C)); // XXX - should redraw all 3D views @@ -403,7 +403,7 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, bool select, bool exten const int size[2] = { BLI_rcti_size_x(rect) + 1, BLI_rcti_size_y(rect) + 1}; - + me = BKE_mesh_from_object(ob); if ((me == NULL) || (me->totpoly == 0) || (size[0] * size[1] <= 0)) { @@ -459,7 +459,7 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, bool select, bool exten IMB_freeImBuf(ibuf); MEM_freeN(selar); -#ifdef __APPLE__ +#ifdef __APPLE__ glReadBuffer(GL_BACK); #endif @@ -522,7 +522,7 @@ void paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags) me = BKE_mesh_from_object(ob); if (me == NULL) return; - + if (action == SEL_TOGGLE) { action = SEL_SELECT; |