From 3e99ec8d3d9e6eccf1b891a0e66432026fc622c5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jun 2012 11:14:10 +0000 Subject: all bmesh operators can now be accessed from bmesh.ops.* using a generic wrapper, argument parsing still needs to have support added for vector, matrix and element types. --- source/blender/bmesh/intern/bmesh_operator_api.h | 3 +++ source/blender/bmesh/intern/bmesh_operators.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/bmesh') diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index c7dfb64e9ec..c6dd33b7a4b 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -352,6 +352,9 @@ int BMO_vert_edge_flags_count(BMesh *bm, BMVert *v, const short oflag); void BMO_slot_map_to_flag(BMesh *bm, BMOperator *op, const char *slot_name, const char hflag, const short oflag); +void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot_name, + const char htype); + /* this part of the API is used to iterate over element buffer or * mapping slots. * diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index e9627cc7a29..48d3cc3721a 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -225,9 +225,9 @@ int BMO_slot_exists(BMOperator *op, const char *slot_name) * * Returns a pointer to the slot of type 'slot_code' */ -BMOpSlot *BMO_slot_get(BMOperator *op, const char *slot_namee) +BMOpSlot *BMO_slot_get(BMOperator *op, const char *slot_name) { - int slot_code = bmo_name_to_slotcode_check(opdefines[op->type], slot_namee); + int slot_code = bmo_name_to_slotcode_check(opdefines[op->type], slot_name); if (slot_code < 0) { return &BMOpEmptySlot; @@ -645,7 +645,7 @@ static void *bmo_slot_buffer_alloc(BMOperator *op, const char *slot_name, int le * * Copies all elements of a certain type into an operator slot. */ -static void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot_name, const char htype) +void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot_name, const char htype) { BMOpSlot *output = BMO_slot_get(op, slot_name); int totelement = 0, i = 0; -- cgit v1.2.3