Blender  V3.3
bmesh_py_types_customdata.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2012 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 /* All use #BPy_BMLayerAccess struct. */
11 
12 extern PyTypeObject BPy_BMLayerAccessVert_Type;
13 extern PyTypeObject BPy_BMLayerAccessEdge_Type;
14 extern PyTypeObject BPy_BMLayerAccessFace_Type;
15 extern PyTypeObject BPy_BMLayerAccessLoop_Type;
16 
17 extern PyTypeObject BPy_BMLayerCollection_Type;
18 extern PyTypeObject BPy_BMLayerItem_Type;
19 
20 #define BPy_BMLayerAccess_Check(v) (Py_TYPE(v) == &BPy_BMLayerAccess_Type)
21 #define BPy_BMLayerCollection_Check(v) (Py_TYPE(v) == &BPy_BMLayerCollection_Type)
22 #define BPy_BMLayerItem_Check(v) (Py_TYPE(v) == &BPy_BMLayerItem_Type)
23 
25 typedef struct BPy_BMLayerAccess {
26  PyObject_VAR_HEAD
27  struct BMesh *bm; /* keep first */
28  char htype;
30 
32 typedef struct BPy_BMLayerCollection {
33  PyObject_VAR_HEAD
34  struct BMesh *bm; /* keep first */
35  char htype;
36  int type; /* customdata type - CD_XXX */
38 
40 typedef struct BPy_BMLayerItem {
41  PyObject_VAR_HEAD
42  struct BMesh *bm; /* keep first */
43  char htype;
44  int type; /* customdata type - CD_XXX */
45  int index; /* index of this layer type */
47 
48 PyObject *BPy_BMLayerAccess_CreatePyObject(BMesh *bm, char htype);
49 PyObject *BPy_BMLayerCollection_CreatePyObject(BMesh *bm, char htype, int type);
50 PyObject *BPy_BMLayerItem_CreatePyObject(BMesh *bm, char htype, int type, int index);
51 
53 
59 PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer);
60 int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObject *value);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
ATTR_WARN_UNUSED_RESULT BMesh * bm
PyTypeObject BPy_BMLayerCollection_Type
PyObject * BPy_BMLayerItem_CreatePyObject(BMesh *bm, char htype, int type, int index)
PyObject * BPy_BMLayerAccess_CreatePyObject(BMesh *bm, char htype)
PyObject * BPy_BMLayerCollection_CreatePyObject(BMesh *bm, char htype, int type)
PyTypeObject BPy_BMLayerItem_Type
struct BPy_BMLayerItem BPy_BMLayerItem
PyTypeObject BPy_BMLayerAccessLoop_Type
void BPy_BM_init_types_customdata(void)
PyTypeObject BPy_BMLayerAccessVert_Type
PyTypeObject BPy_BMLayerAccessFace_Type
struct BPy_BMLayerCollection BPy_BMLayerCollection
struct BPy_BMLayerAccess BPy_BMLayerAccess
PyTypeObject BPy_BMLayerAccessEdge_Type
int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObject *value)
PyObject * BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
BMElem.__getitem__() / setitem()
PyObject_VAR_HEAD struct BMesh * bm
PyObject_VAR_HEAD struct BMesh * bm
PyObject_VAR_HEAD struct BMesh * bm