Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / mesh / editmesh_loopcut.c
index 26bac99..3e787b2 100644 (file)
@@ -77,7 +77,7 @@
 typedef struct RingSelOpData {
        ARegion *ar;        /* region that ringsel was activated in */
        void *draw_handle;  /* for drawing preview loop */
-       
+
        float (*edges)[2][3];
        int totedge;
 
@@ -109,7 +109,7 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
 {
        View3D *v3d = CTX_wm_view3d(C);
        RingSelOpData *lcd = arg;
-       
+
        if ((lcd->totedge > 0) || (lcd->totpoint > 0)) {
                if (v3d && v3d->zbuf)
                        glDisable(GL_DEPTH_TEST);
@@ -172,7 +172,7 @@ static void edgering_find_order(BMEdge *lasteed, BMEdge *eed,
                                break;
                }
        }
-       
+
        /* this should never happen */
        if (!l) {
                v[0][0] = eed->v1;
@@ -181,7 +181,7 @@ static void edgering_find_order(BMEdge *lasteed, BMEdge *eed,
                v[1][1] = lasteed->v2;
                return;
        }
-       
+
        l2 = BM_loop_other_edge_loop(l, eed->v1);
        rev = (l2 == l->prev);
        while (l2->v != lasteed->v1 && l2->v != lasteed->v2) {
@@ -446,7 +446,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                BMVert *v_eed_orig[2] = {lcd->eed->v1, lcd->eed->v2};
 
                edgering_select(lcd);
-               
+
                if (lcd->do_cut) {
                        const bool is_macro = (op->opm != NULL);
                        /* a single edge (rare, but better support) */
@@ -494,7 +494,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                                BM_select_history_store(em->bm, lcd->eed->v1);  /* low priority TODO, get vertrex close to mouse */
                        if (em->selectmode & SCE_SELECT_EDGE)
                                BM_select_history_store(em->bm, lcd->eed);
-                       
+
                        EDBM_selectmode_flush(lcd->em);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data);
                }
@@ -508,7 +508,7 @@ static void ringsel_exit(bContext *UNUSED(C), wmOperator *op)
 
        /* deactivate the extra drawing stuff in 3D-View */
        ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle);
-       
+
        edgering_preview_free(lcd);
 
        MEM_freeN(lcd->objects);
@@ -776,7 +776,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
                        case LEFTMOUSE: /* confirm */ // XXX hardcoded
                                if (event->val == KM_PRESS)
                                        return loopcut_finish(lcd, C, op);
-                               
+
                                ED_region_tag_redraw(lcd->ar);
                                handled = true;
                                break;
@@ -791,11 +791,11 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                        /* cancel */
                                        ED_region_tag_redraw(lcd->ar);
                                        ED_area_headerprint(CTX_wm_area(C), NULL);
-                                       
+
                                        ringcut_cancel(C, op);
                                        return OPERATOR_CANCELLED;
                                }
-                               
+
                                ED_region_tag_redraw(lcd->ar);
                                handled = true;
                                break;
@@ -897,7 +897,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
                             str_rep, str_rep + NUM_STR_REP_LEN);
                ED_area_headerprint(CTX_wm_area(C), buf);
        }
-       
+
        /* keep going until the user confirms */
        return OPERATOR_RUNNING_MODAL;
 }
@@ -911,11 +911,11 @@ void MESH_OT_edgering_select(wmOperatorType *ot)
        ot->name = "Edge Ring Select";
        ot->idname = "MESH_OT_edgering_select";
        ot->description = "Select an edge ring";
-       
+
        /* callbacks */
        ot->invoke = ringsel_invoke;
-       ot->poll = ED_operator_editmesh_region_view3d; 
-       
+       ot->poll = ED_operator_editmesh_region_view3d;
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
@@ -932,14 +932,14 @@ void MESH_OT_loopcut(wmOperatorType *ot)
        ot->name = "Loop Cut";
        ot->idname = "MESH_OT_loopcut";
        ot->description = "Add a new loop between existing loops";
-       
+
        /* callbacks */
        ot->invoke = ringcut_invoke;
        ot->exec = loopcut_exec;
        ot->modal = loopcut_modal;
        ot->cancel = ringcut_cancel;
        ot->poll = ED_operator_editmesh_region_view3d;
-       
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;