Blender V5.3
blender::BMOIter Struct Reference

#include <bmesh_operator_api.hh>

Public Attributes

BMOpSlot * slot
int cur
GHashIterator giter
void ** val
char restrictmask

Detailed Description

This part of the API is used to iterate over element buffer or mapping slots.

for example, iterating over the faces in a slot is:

BMOIter oiter;
BMFace *f;
f = BMO_iter_new(&oiter, some_operator, "slot_name", BM_FACE);
for (; f; f = BMO_iter_step(&oiter)) {
// do something with the face
}
another example, iterating over a mapping:
BMOIter oiter;
void *key;
void *val;
key = BMO_iter_new(&oiter, bm, some_operator, "slot_name", 0);
for (; key; key = BMO_iter_step(&oiter)) {
val = BMO_iter_map_value(&oiter);
//do something with the key/val pair
//note that val is a pointer to the val data,
//whether it's a float, pointer, whatever.
//
// so to get a pointer, for example, use:
// *((void **)BMO_iter_map_value(&oiter));
//or something like that.
}
void * BMO_iter_step(BMOIter *iter)
void * BMO_iter_new(BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char restrictmask)
New Iterator.

Definition at line 797 of file bmesh_operator_api.hh.

Member Data Documentation

◆ cur

int blender::BMOIter::cur

Definition at line 799 of file bmesh_operator_api.hh.

Referenced by blender::BMO_iter_new(), and blender::BMO_iter_step().

◆ giter

GHashIterator blender::BMOIter::giter

Definition at line 800 of file bmesh_operator_api.hh.

Referenced by blender::BMO_iter_new(), and blender::BMO_iter_step().

◆ restrictmask

char blender::BMOIter::restrictmask

Bit-wise '&' with #BMHeader.htype

Definition at line 803 of file bmesh_operator_api.hh.

Referenced by blender::BMO_iter_new(), and blender::BMO_iter_step().

◆ slot

◆ val


The documentation for this struct was generated from the following file: