Blender  V3.3
Public Attributes | List of all members
BMOIter Struct Reference

#include <bmesh_operator_api.h>

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.
}
@ BM_FACE
Definition: bmesh_class.h:386
ATTR_WARN_UNUSED_RESULT BMesh * bm
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.
static unsigned a[3]
Definition: RandGen.cpp:78

Definition at line 782 of file bmesh_operator_api.h.

Member Data Documentation

◆ cur

int BMOIter::cur

Definition at line 784 of file bmesh_operator_api.h.

Referenced by BMO_iter_new(), and BMO_iter_step().

◆ giter

GHashIterator BMOIter::giter

Definition at line 785 of file bmesh_operator_api.h.

Referenced by BMO_iter_new(), and BMO_iter_step().

◆ restrictmask

char BMOIter::restrictmask

Bit-wise '&' with BMHeader.htype

Definition at line 788 of file bmesh_operator_api.h.

Referenced by BMO_iter_new(), and BMO_iter_step().

◆ slot

BMOpSlot* BMOIter::slot

◆ val

void** BMOIter::val

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