Blender V4.3
BMOIter Struct Reference

#include <bmesh_operator_api.hh>

Public Attributes

BMOpSlotslot
 
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.
}
ATTR_WARN_UNUSED_RESULT BMesh * bm
#define BM_FACE
void * BMO_iter_new(BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char restrictmask)
New Iterator.
void * BMO_iter_step(BMOIter *iter)

Definition at line 784 of file bmesh_operator_api.hh.

Member Data Documentation

◆ cur

int BMOIter::cur

Definition at line 786 of file bmesh_operator_api.hh.

Referenced by BMO_iter_new(), and BMO_iter_step().

◆ giter

GHashIterator BMOIter::giter

Definition at line 787 of file bmesh_operator_api.hh.

Referenced by BMO_iter_new(), and BMO_iter_step().

◆ restrictmask

char BMOIter::restrictmask

Bit-wise '&' with BMHeader.htype

Definition at line 790 of file bmesh_operator_api.hh.

Referenced by BMO_iter_new(), and BMO_iter_step().

◆ slot

◆ val


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