Blender V5.3
bmesh_py_types_customdata.cc File Reference
#include <Python.h>
#include <algorithm>
#include "BLI_math_vector_c.hh"
#include "BLI_utildefines.hh"
#include "bmesh.hh"
#include "bmesh_py_types.hh"
#include "bmesh_py_types_customdata.hh"
#include "bmesh_py_types_meshdata.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_utildefines.hh"
#include "../mathutils/mathutils.hh"
#include "BKE_customdata.hh"
#include "DNA_meshdata_types.h"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Functions

static bool blender::bpy_bm_layer_type_is_skin (const int type)
static CustomData * blender::bpy_bm_customdata_get (BMesh *bm, char htype)
static CustomDataLayer * blender::bpy_bmlayeritem_get (BPy_BMLayerItem *self)
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__float_doc, "Generic float custom-data layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [float]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__int_doc, "Generic int custom-data layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [int]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__bool_doc, "Generic boolean custom-data layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [bool]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__float_vector_doc, "Generic 3D vector with float precision custom-data layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [:class:`mathutils.Vector`]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__float_color_doc, "Generic RGBA color with float precision custom-data layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [:class:`mathutils.Vector`]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__color_doc, "Generic RGBA color with 8-bit precision custom-data layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [:class:`mathutils.Vector`]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__string_doc, "Generic string custom-data layer (exposed as bytes, 255 max length).\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [bytes]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__deform_doc, "Vertex deform weight :class:`bmesh.types.BMDeformVert` (TODO).\n" "\n" ":type: " ":class:`bmesh.types.BMLayerCollection`\\ [:class:`bmesh.types.BMDeformVert`]")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__shape_doc, "Vertex shape-key absolute location (as a 3D Vector).\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [:class:`mathutils.Vector`]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__uv_doc, "Accessor for :class:`bmesh.types.BMLoopUV` UV (as a 2D Vector).\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [:class:`bmesh.types.BMLoopUV`]\n")
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_collection__skin_doc, "Accessor for skin layer.\n" "\n" ":type: :class:`bmesh.types.BMLayerCollection`\\ [:class:`bmesh.types.BMVertSkin`]\n")
static PyObject * blender::bpy_bmlayeraccess_collection_get (BPy_BMLayerAccess *self, void *flag)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_active_doc, "The active layer of this type (read-only).\n" "\n" ":type: :class:`bmesh.types.BMLayerItem` | None\n")
static PyObject * blender::bpy_bmlayercollection_active_get (BPy_BMLayerItem *self, void *)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_is_singleton_doc, "True if there can exist only one layer of this type (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_bmlayercollection_is_singleton_get (BPy_BMLayerItem *self, void *)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_name_doc, "The layer's unique name (read-only).\n" "\n" ":type: str\n")
static PyObject * blender::bpy_bmlayeritem_name_get (BPy_BMLayerItem *self, void *)
 blender::PyDoc_STRVAR (bpy_bmlayeritem_copy_from_doc, ".. method:: copy_from(other)\n" "\n" " Copy data from another layer.\n" "\n" " :param other: Another layer to copy from.\n" " :type other: :class:`bmesh.types.BMLayerItem`\n")
static PyObject * blender::bpy_bmlayeritem_copy_from (BPy_BMLayerItem *self, BPy_BMLayerItem *value)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_verify_doc, ".. method:: verify()\n" "\n" " Create a new layer or return an existing active layer\n" "\n" " :return: The newly created layer, or the existing active layer.\n" " :rtype: :class:`bmesh.types.BMLayerItem`\n")
static PyObject * blender::bpy_bmlayercollection_verify (BPy_BMLayerCollection *self)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_new_doc, ".. method:: new(name=\"\")\n" "\n" " Create a new layer\n" "\n" " :param name: Optional name argument (will be made unique).\n" " :type name: str\n" " :return: The newly created layer.\n" " :rtype: :class:`bmesh.types.BMLayerItem`\n")
static PyObject * blender::bpy_bmlayercollection_new (BPy_BMLayerCollection *self, PyObject *args)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_remove_doc, ".. method:: remove(layer)\n" "\n" " Remove a layer\n" "\n" " :param layer: The layer to remove.\n" " :type layer: :class:`bmesh.types.BMLayerItem`\n")
static PyObject * blender::bpy_bmlayercollection_remove (BPy_BMLayerCollection *self, BPy_BMLayerItem *value)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_keys_doc, ".. method:: keys()\n" "\n" " Return the identifiers of collection members\n" " (matching Python's dict.keys() functionality).\n" "\n" " :return: the identifiers for each member of this collection.\n" " :rtype: list[str]\n")
static PyObject * blender::bpy_bmlayercollection_keys (BPy_BMLayerCollection *self)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_items_doc, ".. method:: items()\n" "\n" " Return the (key, value) pairs of collection members\n" " (matching Python's dict.items() functionality).\n" "\n" " :return: (key, value) pairs for each member of this collection.\n" " :rtype: list[tuple[str, :class:`bmesh.types.BMLayerItem`]]\n")
static PyObject * blender::bpy_bmlayercollection_items (BPy_BMLayerCollection *self)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_values_doc, ".. method:: values()\n" "\n" " Return the values of collection\n" " (matching Python's dict.values() functionality).\n" "\n" " :return: the members of this collection.\n" " :rtype: list[:class:`bmesh.types.BMLayerItem`]\n")
static PyObject * blender::bpy_bmlayercollection_values (BPy_BMLayerCollection *self)
 blender::PyDoc_STRVAR (bpy_bmlayercollection_get_doc, ".. method:: get(key, default=None)\n" "\n" " Returns the value of the layer matching the key or default\n" " when not found (matches Python's dictionary function of the same name).\n" "\n" " :param key: The key associated with the layer.\n" " :type key: str\n" " :param default: Optional argument for the value to return if\n" " *key* is not found.\n" " :type default: Any\n" " :return: The layer matching the key or the default value.\n" " :rtype: :class:`bmesh.types.BMLayerItem` | Any\n")
static PyObject * blender::bpy_bmlayercollection_get (BPy_BMLayerCollection *self, PyObject *args)
static Py_ssize_t blender::bpy_bmlayercollection_length (BPy_BMLayerCollection *self)
static PyObject * blender::bpy_bmlayercollection_subscript_str (BPy_BMLayerCollection *self, const char *keyname)
static PyObject * blender::bpy_bmlayercollection_subscript_int (BPy_BMLayerCollection *self, Py_ssize_t keynum)
static PyObject * blender::bpy_bmlayercollection_subscript_slice (BPy_BMLayerCollection *self, Py_ssize_t start, Py_ssize_t stop)
static PyObject * blender::bpy_bmlayercollection_subscript (BPy_BMLayerCollection *self, PyObject *key)
static int blender::bpy_bmlayercollection_contains (BPy_BMLayerCollection *self, PyObject *value)
static PyObject * blender::bpy_bmlayercollection_iter (BPy_BMLayerCollection *self)
 blender::PyDoc_STRVAR (bpy_bmlayeraccess_type_doc, "Exposes custom-data layer attributes.\n")
 blender::PyDoc_STRVAR (bpy_bmlayercollection_type_doc, "Gives access to a collection of custom-data layers of the same type and behaves " "like Python dictionaries, " "except for the ability to do list like index access.\n")
 blender::PyDoc_STRVAR (bpy_bmlayeritem_type_doc, "Exposes a single custom data layer, " "its main purpose is for use as an item accessor to custom-data when used with " "vert/edge/face/loop data.\n")
PyObject * blender::BPy_BMLayerAccess_CreatePyObject (BMesh *bm, const char htype)
PyObject * blender::BPy_BMLayerCollection_CreatePyObject (BMesh *bm, const char htype, int type)
PyObject * blender::BPy_BMLayerItem_CreatePyObject (BMesh *bm, const char htype, int type, int index)
void blender::BPy_BM_init_types_customdata ()
static void * blender::bpy_bmlayeritem_ptr_get (BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
PyObject * blender::BPy_BMLayerItem_GetItem (BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
 BMElem.__getitem__() / __setitem__()
int blender::BPy_BMLayerItem_SetItem (BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObject *py_value)

Variables

constexpr int blender::BPY_BM_LAYER_TYPE_SKIN = CD_NUMTYPES
static const char * blender::bpy_bm_layer_skin_radius_name = "skin_modifier_radius"
static const char * blender::bpy_bm_layer_skin_root_name = "skin_modifier_root"
static const char * blender::bpy_bm_layer_skin_loose_name = "skin_modifier_loose"
static PyGetSetDef blender::bpy_bmlayeraccess_vert_getseters []
static PyGetSetDef blender::bpy_bmlayeraccess_edge_getseters []
static PyGetSetDef blender::bpy_bmlayeraccess_face_getseters []
static PyGetSetDef blender::bpy_bmlayeraccess_loop_getseters []
static PyGetSetDef blender::bpy_bmlayercollection_getseters []
static PyGetSetDef blender::bpy_bmlayeritem_getseters []
static PyMethodDef blender::bpy_bmlayeritem_methods []
static PyMethodDef blender::bpy_bmelemseq_methods []
static PySequenceMethods blender::bpy_bmlayercollection_as_sequence
static PyMappingMethods blender::bpy_bmlayercollection_as_mapping
PyTypeObject blender::BPy_BMLayerAccessVert_Type
PyTypeObject blender::BPy_BMLayerAccessEdge_Type
PyTypeObject blender::BPy_BMLayerAccessFace_Type
PyTypeObject blender::BPy_BMLayerAccessLoop_Type
PyTypeObject blender::BPy_BMLayerCollection_Type
PyTypeObject blender::BPy_BMLayerItem_Type

Detailed Description

This file defines the types for 'BMesh.verts/edges/faces/loops.layers' customdata layer access.

Definition in file bmesh_py_types_customdata.cc.