diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-11 14:34:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-11 14:54:06 +0300 |
commit | ee37de75e6edad2bdfb8b75a8c6d7cb2c0be2956 (patch) | |
tree | 8a7ce078494595a0ee2dd926bc3b8e540a8ed2c0 /source/blender | |
parent | 867cd2048e0e8dd9f0552ac996bb1d352136b9a0 (diff) |
BMesh: add BMO_ITER_INDEX macro
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operator_api.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index 3f7fb7b257d..14e9bf81be7 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -501,6 +501,11 @@ bool BMO_iter_map_value_bool(BMOIter *iter); ele; \ BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter)) +#define BMO_ITER_INDEX(ele, iter, slot_args, slot_name, restrict_flag, i_) \ + for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag), i_ = 0; \ + ele; \ + BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter), i_++) + extern const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES]; int BMO_opcode_from_opname(const char *opname); |