Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/bmesh/operators/bmo_slide.c')
-rw-r--r--source/blender/bmesh/operators/bmo_slide.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/bmesh/operators/bmo_slide.c b/source/blender/bmesh/operators/bmo_slide.c
index 9dde2461364..ea9f9bf9eba 100644
--- a/source/blender/bmesh/operators/bmo_slide.c
+++ b/source/blender/bmesh/operators/bmo_slide.c
@@ -53,11 +53,10 @@ void bmo_slide_vert_exec(BMesh *bm, BMOperator *op)
int selected_edges = 0;
/* Get slide amount */
- const float distance_t = BMO_slot_float_get(op->slots_in, "distance_t");
+ const float factor = BMO_slot_float_get(op->slots_in, "factor");
/* Get start vertex */
- vertex = BMO_iter_new(&oiter, op->slots_in, "vert", BM_VERT);
-
+ vertex = BMO_slot_buffer_get_single(BMO_slot_get(op->slots_in, "vert"));
if (!vertex) {
if (G.debug & G_DEBUG) {
@@ -67,15 +66,13 @@ void bmo_slide_vert_exec(BMesh *bm, BMOperator *op)
return;
}
+ /* BMESH_TODO - this is odd, it only uses one edge, why take a list at all? */
/* Count selected edges */
- BMO_ITER (h, &oiter, op->slots_in, "edge", BM_VERT | BM_EDGE) {
- switch (h->htype) {
- case BM_EDGE:
- selected_edges++;
- /* Mark all selected edges (cast BMHeader->BMEdge) */
- BMO_elem_flag_enable(bm, (BMElemF *)h, EDGE_MARK);
- break;
- }
+ BMO_ITER (h, &oiter, op->slots_in, "edges", BM_EDGE) {
+ selected_edges++;
+ /* Mark all selected edges (cast BMHeader->BMEdge) */
+ BMO_elem_flag_enable(bm, (BMElemF *)h, EDGE_MARK);
+ break;
}
/* Only allow sliding if an edge is selected */
@@ -104,7 +101,7 @@ void bmo_slide_vert_exec(BMesh *bm, BMOperator *op)
BMO_elem_flag_enable(bm, vertex, VERT_MARK);
/* Interpolate */
- interp_v3_v3v3(vertex->co, vertex->co, other->co, distance_t);
+ interp_v3_v3v3(vertex->co, vertex->co, other->co, factor);
}
/* Return the new edge. The same previously marked with VERT_MARK */