diff options
author | Joseph Eagar <joeedh@gmail.com> | 2009-07-16 10:27:37 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2009-07-16 10:27:37 +0400 |
commit | 0b1649b2b86b52b44bdabf8e3542d8adffb55623 (patch) | |
tree | 542e10220a719f2a54e8afbee7b11195b6dac344 /source/blender/editors/mesh/editmesh_loop.c | |
parent | 3bade135035dacfdb4a3833f3fac3bf5811ce7de (diff) | |
parent | 0bfc98706ef93f90bd74b195b98c36c7dcea94dd (diff) |
merge with 2.5 at r21568
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loop.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_loop.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 7f1d56aee73..9b5de48a644 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -372,9 +372,9 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) fac= 1.0f; // XXX if(fbutton(&fac, 0.0f, 5.0f, 10, 10, "Smooth:")==0) return; fac= 0.292f*fac; - esubdivideflag(obedit, em, SELECT,fac,B_SMOOTH,numcuts,SUBDIV_SELECT_LOOPCUT); + esubdivideflag(obedit, em, SELECT,fac,0,B_SMOOTH,numcuts,SUBDIV_SELECT_LOOPCUT); } else { - esubdivideflag(obedit, em, SELECT,0,0,numcuts,SUBDIV_SELECT_LOOPCUT); + esubdivideflag(obedit, em, SELECT,0,0,0,numcuts,SUBDIV_SELECT_LOOPCUT); } /* if this was a single cut, enter edgeslide mode */ if(numcuts == 1 && hasHidden == 0){ @@ -462,10 +462,10 @@ typedef struct CutCurve { #define KNIFE_MULTICUT 3 static EnumPropertyItem knife_items[]= { - {KNIFE_EXACT, "EXACT", "Exact", ""}, - {KNIFE_MIDPOINT, "MIDPOINTS", "Midpoints", ""}, - {KNIFE_MULTICUT, "MULTICUT", "Multicut", ""}, - {0, NULL, NULL} + {KNIFE_EXACT, "EXACT", 0, "Exact", ""}, + {KNIFE_MIDPOINT, "MIDPOINTS", 0, "Midpoints", ""}, + {KNIFE_MULTICUT, "MULTICUT", 0, "Multicut", ""}, + {0, NULL, 0, NULL, NULL} }; /* seg_intersect() Determines if and where a mouse trail intersects an EditEdge */ @@ -784,6 +784,7 @@ static float bm_seg_intersect(BMEdge *e, CutCurve *c, int len, char mode, static int knife_cut_exec(bContext *C, wmOperator *op) { + Scene *scene = CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); BMEditMesh *em= (((Mesh *)obedit->data))->edit_btmesh; BMesh *bm = em->bm; @@ -837,7 +838,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op) isect= bm_seg_intersect(be, curve, len, mode, gh, &isected); if (isect != 0.0f) { - if (mode != KNIFE_MULTICUT) { + if (mode != KNIFE_MULTICUT && mode != KNIFE_MIDPOINT) { BMO_Insert_MapFloat(bm, &bmop, "edgepercents", be, isect); @@ -868,6 +869,10 @@ static int knife_cut_exec(bContext *C, wmOperator *op) BLI_ghash_free(gh, NULL, (GHashValFreeFP)WMEM_freeN); + + DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); + return OPERATOR_FINISHED; } |