diff options
author | Francisco De La Cruz <dlcs.frank@gmail.com> | 2012-04-15 22:34:13 +0400 |
---|---|---|
committer | Francisco De La Cruz <dlcs.frank@gmail.com> | 2012-04-15 22:34:13 +0400 |
commit | 86508076d8190a374bcd9c17785eb0802dd4c1ca (patch) | |
tree | f3f47c0b0cf5f528b6af34a3aadacdafcd3a0d0b /source/blender/bmesh/operators | |
parent | 117f2826b929b0100b4233577a310ae5cc907cb0 (diff) |
Fix [#30943] Crash when edge mode enabled and use the bmesh vertex slide(shift-V)
Also fixed snapping sensitivity. Gave BMOp a more consistent name "vertex_slide".
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_slide.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/bmesh/operators/bmo_slide.c b/source/blender/bmesh/operators/bmo_slide.c index 9414c7308b6..7b7b0638a3f 100644 --- a/source/blender/bmesh/operators/bmo_slide.c +++ b/source/blender/bmesh/operators/bmo_slide.c @@ -40,7 +40,7 @@ * Slides a vertex along a connected edge * */ -void bmo_vert_slide_exec(BMesh *bm, BMOperator *op) +void bmo_vertex_slide_exec(BMesh *bm, BMOperator *op) { BMOIter oiter; BMIter iter; @@ -60,8 +60,10 @@ void bmo_vert_slide_exec(BMesh *bm, BMOperator *op) if (!vertex) { - if (G.debug & G_DEBUG) - fprintf(stderr, "vertslide: No vertex selected..."); + if (G.debug & G_DEBUG) { + fprintf(stderr, "vertex_slide: No vertex selected..."); + } + BMO_error_raise(bm, op, BMERR_INVALID_SELECTION, "Vertex Slide Error: Invalid selection."); return; } @@ -78,8 +80,10 @@ void bmo_vert_slide_exec(BMesh *bm, BMOperator *op) /* Only allow sliding if an edge is selected */ if (selected_edges == 0) { - if (G.debug & G_DEBUG) - fprintf(stderr, "vertslide: select a single edge\n"); + if (G.debug & G_DEBUG) { + fprintf(stderr, "vertex_slide: select a single edge\n"); + } + BMO_error_raise(bm, op, BMERR_INVALID_SELECTION, "Vertex Slide Error: Invalid selection."); return; } @@ -102,9 +106,6 @@ void bmo_vert_slide_exec(BMesh *bm, BMOperator *op) interp_v3_v3v3(vertex->co, vertex->co, other->co, distance_t); } - /* Deselect the edges */ - BMO_slot_buffer_hflag_disable(bm, op, "edge", BM_ALL, BM_ELEM_SELECT, TRUE); - /* Return the new edge. The same previously marked with VERT_MARK */ BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); return; |