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-20 17:29:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-20 17:29:27 +0400
commitebaf1306b8167ea28be61980305a53b3c54cc4dc (patch)
treec4bcb52ec0fbc33d72e88bffd8df63f65155c377 /source/blender/bmesh/intern/bmesh_operator_api.h
parent1dd5a89c87563d077f016fc38894c5195f6f03b0 (diff)
bmesh operator api:
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operator_api.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index a44900cd4f5..1bff79ba799 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -140,6 +140,10 @@ typedef struct BMOpSlot {
#define BMO_SLOT_AS_BUFFER(slot ) ((slot)->data.buf)
#define BMO_SLOT_AS_GHASH(slot ) ((slot)->data.ghash)
+#define BMO_ASSERT_SLOT_IN_OP(slot, op) \
+ BLI_assert(((slot >= (op)->slots_in) && (slot < &(op)->slots_in[BMO_OP_MAX_SLOTS])) || \
+ ((slot >= (op)->slots_out) && (slot < &(op)->slots_out[BMO_OP_MAX_SLOTS])))
+
/* way more than probably needed, compiler complains if limit hit */
#define BMO_OP_MAX_SLOTS 16
@@ -385,8 +389,8 @@ void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op,
int BMO_slot_buffer_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
-void BMO_slot_map_insert(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name,
- void *element, void *data, int len);
+void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot,
+ const void *element, void *data, int len);
/* Counts the number of edges with tool flag toolflag around
*/