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:
authorCampbell Barton <ideasman42@gmail.com>2012-11-27 13:21:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-27 13:21:57 +0400
commita9855c227e6bfc955a6b2f15e8ee656218c3f916 (patch)
tree8e49eb73516a927b9cfb1516d764d14c857a9af1 /source/blender/bmesh/operators/bmo_utils.c
parent0cd26e6066a071ecd230aa9b865b9223ea4ba13a (diff)
py/bmesh api - add support for single item buffers (odd feature but used quite a bit with bmesh operators).
also add utility functions BMO_slot_buffer_from_single(), BMO_slot_buffer_get_single()
Diffstat (limited to 'source/blender/bmesh/operators/bmo_utils.c')
-rw-r--r--source/blender/bmesh/operators/bmo_utils.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c
index 203acff8332..c7ab8f62f40 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -701,9 +701,8 @@ typedef struct ElemNode {
void bmo_shortest_path_exec(BMesh *bm, BMOperator *op)
{
- BMOIter vs_iter /* , vs2_iter */; /* selected verts iterator */
BMIter v_iter; /* mesh verts iterator */
- BMVert *vs, *sv, *ev; /* starting vertex, ending vertex */
+ BMVert *sv, *ev; /* starting vertex, ending vertex */
BMVert *v; /* mesh vertex */
Heap *h = NULL;
@@ -712,13 +711,8 @@ void bmo_shortest_path_exec(BMesh *bm, BMOperator *op)
int num_total = 0 /*, num_sels = 0 */, i = 0;
const int type = BMO_slot_int_get(op->slots_in, "type");
- /* BMESH_TODO use BMO_slot_buffer_elem_first here? */
- BMO_ITER (vs, &vs_iter, op->slots_in, "startv", BM_VERT) {
- sv = vs;
- }
- BMO_ITER (vs, &vs_iter, op->slots_in, "endv", BM_VERT) {
- ev = vs;
- }
+ sv = BMO_slot_buffer_get_single(BMO_slot_get(op->slots_in, "startv"));
+ ev = BMO_slot_buffer_get_single(BMO_slot_get(op->slots_in, "endv"));
num_total = BM_mesh_elem_count(bm, BM_VERT);