Blender
V3.3
|
#include <Python.h>
#include "../mathutils/mathutils.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_math_base.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BKE_deform.h"
#include "bmesh_py_types_meshdata.h"
#include "../generic/py_capi_utils.h"
#include "../generic/python_utildefines.h"
Go to the source code of this file.
Classes | |
struct | BPy_BMLoopUV |
struct | BPy_BMVertSkin |
struct | BPy_BMDeformVert |
Macros | |
#define | BPy_BMLoopUV_Check(v) (Py_TYPE(v) == &BPy_BMLoopUV_Type) |
#define | BPy_BMVertSkin_Check(v) (Py_TYPE(v) == &BPy_BMVertSkin_Type) |
#define | MLOOPCOL_FROM_CAPSULE(color_capsule) ((MLoopCol *)PyCapsule_GetPointer(color_capsule, NULL)) |
#define | BPy_BMDeformVert_Check(v) (Py_TYPE(v) == &BPy_BMDeformVert_Type) |
Typedefs | |
typedef struct BPy_BMLoopUV | BPy_BMLoopUV |
typedef struct BPy_BMVertSkin | BPy_BMVertSkin |
typedef struct BPy_BMDeformVert | BPy_BMDeformVert |
Functions | |
PyDoc_STRVAR (bpy_bmloopuv_uv_doc, "Loops UV (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`") | |
static PyObject * | bpy_bmloopuv_uv_get (BPy_BMLoopUV *self, void *UNUSED(closure)) |
static int | bpy_bmloopuv_uv_set (BPy_BMLoopUV *self, PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (bpy_bmloopuv_flag__pin_uv_doc, "UV pin state.\n\n:type: boolean") | |
PyDoc_STRVAR (bpy_bmloopuv_flag__select_doc, "UV select state.\n\n:type: boolean") | |
PyDoc_STRVAR (bpy_bmloopuv_flag__select_edge_doc, "UV edge select state.\n\n:type: boolean") | |
static PyObject * | bpy_bmloopuv_flag_get (BPy_BMLoopUV *self, void *flag_p) |
static int | bpy_bmloopuv_flag_set (BPy_BMLoopUV *self, PyObject *value, void *flag_p) |
static void | bm_init_types_bmloopuv (void) |
int | BPy_BMLoopUV_AssignPyObject (struct MLoopUV *mloopuv, PyObject *value) |
PyObject * | BPy_BMLoopUV_CreatePyObject (struct MLoopUV *mloopuv) |
PyDoc_STRVAR (bpy_bmvertskin_radius_doc, "Vert skin radii (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`") | |
static PyObject * | bpy_bmvertskin_radius_get (BPy_BMVertSkin *self, void *UNUSED(closure)) |
static int | bpy_bmvertskin_radius_set (BPy_BMVertSkin *self, PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (bpy_bmvertskin_flag__use_root_doc, "Use as root vertex. Setting this flag does not clear other roots in the same mesh " "island.\n\n:type: boolean") | |
PyDoc_STRVAR (bpy_bmvertskin_flag__use_loose_doc, "Use loose vertex.\n\n:type: boolean") | |
static PyObject * | bpy_bmvertskin_flag_get (BPy_BMVertSkin *self, void *flag_p) |
static int | bpy_bmvertskin_flag_set (BPy_BMVertSkin *self, PyObject *value, void *flag_p) |
static void | bm_init_types_bmvertskin (void) |
int | BPy_BMVertSkin_AssignPyObject (struct MVertSkin *mvertskin, PyObject *value) |
PyObject * | BPy_BMVertSkin_CreatePyObject (struct MVertSkin *mvertskin) |
static void | mloopcol_to_float (const MLoopCol *mloopcol, float r_col[4]) |
static void | mloopcol_from_float (MLoopCol *mloopcol, const float col[4]) |
static int | mathutils_bmloopcol_check (BaseMathObject *UNUSED(bmo)) |
static int | mathutils_bmloopcol_get (BaseMathObject *bmo, int UNUSED(subtype)) |
static int | mathutils_bmloopcol_set (BaseMathObject *bmo, int UNUSED(subtype)) |
static int | mathutils_bmloopcol_get_index (BaseMathObject *bmo, int subtype, int UNUSED(index)) |
static int | mathutils_bmloopcol_set_index (BaseMathObject *bmo, int subtype, int index) |
static void | bm_init_types_bmloopcol (void) |
int | BPy_BMLoopColor_AssignPyObject (struct MLoopCol *mloopcol, PyObject *value) |
PyObject * | BPy_BMLoopColor_CreatePyObject (struct MLoopCol *mloopcol) |
static int | bpy_bmdeformvert_len (BPy_BMDeformVert *self) |
static PyObject * | bpy_bmdeformvert_subscript (BPy_BMDeformVert *self, PyObject *key) |
static int | bpy_bmdeformvert_ass_subscript (BPy_BMDeformVert *self, PyObject *key, PyObject *value) |
static int | bpy_bmdeformvert_contains (BPy_BMDeformVert *self, PyObject *value) |
PyDoc_STRVAR (bpy_bmdeformvert_keys_doc, ".. method:: keys()\n" "\n" " Return the group indices used by this vertex\n" " (matching pythons dict.keys() functionality).\n" "\n" " :return: the deform group this vertex uses\n" " :rtype: list of ints\n") | |
static PyObject * | bpy_bmdeformvert_keys (BPy_BMDeformVert *self) |
PyDoc_STRVAR (bpy_bmdeformvert_values_doc, ".. method:: values()\n" "\n" " Return the weights of the deform vertex\n" " (matching pythons dict.values() functionality).\n" "\n" " :return: The weights that influence this vertex\n" " :rtype: list of floats\n") | |
static PyObject * | bpy_bmdeformvert_values (BPy_BMDeformVert *self) |
PyDoc_STRVAR (bpy_bmdeformvert_items_doc, ".. method:: items()\n" "\n" " Return (group, weight) pairs for this vertex\n" " (matching pythons dict.items() functionality).\n" "\n" " :return: (key, value) pairs for each deform weight of this vertex.\n" " :rtype: list of tuples\n") | |
static PyObject * | bpy_bmdeformvert_items (BPy_BMDeformVert *self) |
PyDoc_STRVAR (bpy_bmdeformvert_get_doc, ".. method:: get(key, default=None)\n" "\n" " Returns the deform weight matching the key or default\n" " when not found (matches pythons dictionary function of the same name).\n" "\n" " :arg key: The key associated with deform weight.\n" " :type key: int\n" " :arg default: Optional argument for the value to return if\n" " *key* is not found.\n" " :type default: Undefined\n") | |
static PyObject * | bpy_bmdeformvert_get (BPy_BMDeformVert *self, PyObject *args) |
PyDoc_STRVAR (bpy_bmdeformvert_clear_doc, ".. method:: clear()\n" "\n" " Clears all weights.\n") | |
static PyObject * | bpy_bmdeformvert_clear (BPy_BMDeformVert *self) |
static void | bm_init_types_bmdvert (void) |
int | BPy_BMDeformVert_AssignPyObject (struct MDeformVert *dvert, PyObject *value) |
PyObject * | BPy_BMDeformVert_CreatePyObject (struct MDeformVert *dvert) |
void | BPy_BM_init_types_meshdata (void) |
Variables | |
static PyGetSetDef | bpy_bmloopuv_getseters [] |
PyTypeObject | BPy_BMLoopUV_Type |
static PyGetSetDef | bpy_bmvertskin_getseters [] |
static PyTypeObject | BPy_BMVertSkin_Type |
static uchar | mathutils_bmloopcol_cb_index = -1 |
static Mathutils_Callback | mathutils_bmloopcol_cb |
static PySequenceMethods | bpy_bmdeformvert_as_sequence |
static PyMappingMethods | bpy_bmdeformvert_as_mapping |
static struct PyMethodDef | bpy_bmdeformvert_methods [] |
PyTypeObject | BPy_BMDeformVert_Type |
This file defines custom-data types which can't be accessed as primitive python types such as MDeformVert, MLoopUV.
Definition in file bmesh_py_types_meshdata.c.
#define BPy_BMDeformVert_Check | ( | v | ) | (Py_TYPE(v) == &BPy_BMDeformVert_Type) |
This is python type wraps a deform vert as a python dictionary, hiding the MDeformWeight on access, since the mapping is very close, eg:
Definition at line 384 of file bmesh_py_types_meshdata.c.
#define BPy_BMLoopUV_Check | ( | v | ) | (Py_TYPE(v) == &BPy_BMLoopUV_Type) |
Definition at line 32 of file bmesh_py_types_meshdata.c.
#define BPy_BMVertSkin_Check | ( | v | ) | (Py_TYPE(v) == &BPy_BMVertSkin_Type) |
Definition at line 146 of file bmesh_py_types_meshdata.c.
#define MLOOPCOL_FROM_CAPSULE | ( | color_capsule | ) | ((MLoopCol *)PyCapsule_GetPointer(color_capsule, NULL)) |
Definition at line 264 of file bmesh_py_types_meshdata.c.
typedef struct BPy_BMDeformVert BPy_BMDeformVert |
typedef struct BPy_BMLoopUV BPy_BMLoopUV |
typedef struct BPy_BMVertSkin BPy_BMVertSkin |
Definition at line 635 of file bmesh_py_types_meshdata.c.
References bpy_bmdeformvert_as_mapping, bpy_bmdeformvert_as_sequence, bpy_bmdeformvert_methods, BPy_BMDeformVert_Type, and NULL.
Referenced by BPy_BM_init_types_meshdata().
Definition at line 329 of file bmesh_py_types_meshdata.c.
References mathutils_bmloopcol_cb, mathutils_bmloopcol_cb_index, and Mathutils_RegisterCallback().
Referenced by BPy_BM_init_types_meshdata().
Definition at line 108 of file bmesh_py_types_meshdata.c.
References bpy_bmloopuv_getseters, BPy_BMLoopUV_Type, and NULL.
Referenced by BPy_BM_init_types_meshdata().
Definition at line 222 of file bmesh_py_types_meshdata.c.
References bpy_bmvertskin_getseters, BPy_BMVertSkin_Type, and NULL.
Referenced by BPy_BM_init_types_meshdata().
Definition at line 676 of file bmesh_py_types_meshdata.c.
References bm_init_types_bmdvert(), bm_init_types_bmloopcol(), bm_init_types_bmloopuv(), and bm_init_types_bmvertskin().
Referenced by BPyInit_bmesh().
|
static |
Definition at line 425 of file bmesh_py_types_meshdata.c.
References BKE_defvert_ensure_index(), BKE_defvert_find_index(), BKE_defvert_remove_group(), clamp_f(), NULL, self, and MDeformWeight::weight.
int BPy_BMDeformVert_AssignPyObject | ( | struct MDeformVert * | dvert, |
PyObject * | value | ||
) |
Definition at line 653 of file bmesh_py_types_meshdata.c.
References BKE_defvert_copy(), BPy_BMDeformVert_Check, LIKELY, and UNLIKELY.
Referenced by BPy_BMLayerItem_SetItem().
|
static |
Definition at line 616 of file bmesh_py_types_meshdata.c.
References BKE_defvert_clear(), and self.
|
static |
Definition at line 475 of file bmesh_py_types_meshdata.c.
References BKE_defvert_find_index(), NULL, and self.
PyObject* BPy_BMDeformVert_CreatePyObject | ( | struct MDeformVert * | dvert | ) |
Definition at line 667 of file bmesh_py_types_meshdata.c.
References BPy_BMDeformVert_Type.
Referenced by BPy_BMLayerItem_GetItem().
|
static |
Definition at line 594 of file bmesh_py_types_meshdata.c.
References BKE_defvert_find_index(), NULL, self, and MDeformWeight::weight.
|
static |
Definition at line 566 of file bmesh_py_types_meshdata.c.
References MDeformWeight::def_nr, PyTuple_SET_ITEMS, ret, self, and MDeformWeight::weight.
|
static |
Definition at line 522 of file bmesh_py_types_meshdata.c.
References MDeformWeight::def_nr, ret, and self.
|
static |
Definition at line 394 of file bmesh_py_types_meshdata.c.
|
static |
Definition at line 399 of file bmesh_py_types_meshdata.c.
References BKE_defvert_find_index(), NULL, self, and MDeformWeight::weight.
|
static |
Definition at line 544 of file bmesh_py_types_meshdata.c.
References ret, self, and MDeformWeight::weight.
int BPy_BMLoopColor_AssignPyObject | ( | struct MLoopCol * | mloopcol, |
PyObject * | value | ||
) |
Definition at line 335 of file bmesh_py_types_meshdata.c.
References mathutils_array_parse(), and mloopcol_from_float().
Referenced by BPy_BMLayerItem_SetItem().
PyObject* BPy_BMLoopColor_CreatePyObject | ( | struct MLoopCol * | mloopcol | ) |
Definition at line 346 of file bmesh_py_types_meshdata.c.
References mathutils_bmloopcol_cb_index, NULL, and Vector_CreatePyObject_cb().
Referenced by BPy_BMLayerItem_GetItem().
int BPy_BMLoopUV_AssignPyObject | ( | struct MLoopUV * | mloopuv, |
PyObject * | value | ||
) |
Definition at line 123 of file bmesh_py_types_meshdata.c.
References BPy_BMLoopUV_Check, and UNLIKELY.
Referenced by BPy_BMLayerItem_SetItem().
PyObject* BPy_BMLoopUV_CreatePyObject | ( | struct MLoopUV * | mloopuv | ) |
Definition at line 134 of file bmesh_py_types_meshdata.c.
References BPy_BMLoopUV_Type.
Referenced by BPy_BMLayerItem_GetItem().
|
static |
Definition at line 61 of file bmesh_py_types_meshdata.c.
References POINTER_AS_INT, and self.
|
static |
Definition at line 67 of file bmesh_py_types_meshdata.c.
References POINTER_AS_INT, and PyC_Long_AsBool().
|
static |
Definition at line 41 of file bmesh_py_types_meshdata.c.
References NULL, self, and Vector_CreatePyObject_wrap().
|
static |
Definition at line 46 of file bmesh_py_types_meshdata.c.
References copy_v2_v2(), mathutils_array_parse(), and self.
int BPy_BMVertSkin_AssignPyObject | ( | struct MVertSkin * | mvertskin, |
PyObject * | value | ||
) |
Definition at line 237 of file bmesh_py_types_meshdata.c.
References BPy_BMVertSkin_Check, and UNLIKELY.
Referenced by BPy_BMLayerItem_SetItem().
PyObject* BPy_BMVertSkin_CreatePyObject | ( | struct MVertSkin * | mvertskin | ) |
Definition at line 248 of file bmesh_py_types_meshdata.c.
References BPy_BMVertSkin_Type.
Referenced by BPy_BMLayerItem_GetItem().
|
static |
Definition at line 176 of file bmesh_py_types_meshdata.c.
References POINTER_AS_INT, and self.
|
static |
Definition at line 182 of file bmesh_py_types_meshdata.c.
References POINTER_AS_INT, and PyC_Long_AsBool().
|
static |
Definition at line 155 of file bmesh_py_types_meshdata.c.
References NULL, self, and Vector_CreatePyObject_wrap().
|
static |
Definition at line 160 of file bmesh_py_types_meshdata.c.
References copy_v2_v2(), mathutils_array_parse(), and self.
|
static |
Definition at line 279 of file bmesh_py_types_meshdata.c.
|
static |
Definition at line 285 of file bmesh_py_types_meshdata.c.
References MLOOPCOL_FROM_CAPSULE, and mloopcol_to_float().
Referenced by mathutils_bmloopcol_get_index(), and mathutils_bmloopcol_set_index().
|
static |
Definition at line 299 of file bmesh_py_types_meshdata.c.
References mathutils_bmloopcol_get().
|
static |
Definition at line 292 of file bmesh_py_types_meshdata.c.
References MLOOPCOL_FROM_CAPSULE, and mloopcol_from_float().
Referenced by mathutils_bmloopcol_set_index().
|
static |
Definition at line 308 of file bmesh_py_types_meshdata.c.
References mathutils_bmloopcol_get(), and mathutils_bmloopcol_set().
Definition at line 272 of file bmesh_py_types_meshdata.c.
References col, MLoopCol::r, and rgba_float_to_uchar().
Referenced by BPy_BMLoopColor_AssignPyObject(), and mathutils_bmloopcol_set().
Definition at line 267 of file bmesh_py_types_meshdata.c.
References MLoopCol::r, and rgba_uchar_to_float().
Referenced by mathutils_bmloopcol_get().
PyDoc_STRVAR | ( | bpy_bmdeformvert_get_doc | , |
".. method:: get(key, default=None)\n" "\n" " Returns the deform weight matching the key or default\n" " when not found (matches pythons dictionary function of the same name).\n" "\n" " :arg key: The key associated with deform weight.\n" " :type key: int\n" " :arg default: Optional argument for the value to return if\n" " *key* is not found.\n" " :type default: Undefined\n" | |||
) |
PyDoc_STRVAR | ( | bpy_bmdeformvert_items_doc | , |
".. method:: items()\n" "\n" " Return (group, weight) pairs for this vertex\n" " (matching pythons dict.items() functionality).\n" "\n" " :return: (key, value) pairs for each deform weight of this vertex.\n" " :rtype: list of tuples\n" | |||
) |
PyDoc_STRVAR | ( | bpy_bmdeformvert_keys_doc | , |
".. method:: keys()\n" "\n" " Return the group indices used by this vertex\n" " (matching pythons dict.keys() functionality).\n" "\n" " :return: the deform group this vertex uses\n" " :rtype: list of ints\n" | |||
) |
PyDoc_STRVAR | ( | bpy_bmdeformvert_values_doc | , |
".. method:: values()\n" "\n" " Return the weights of the deform vertex\n" " (matching pythons dict.values() functionality).\n" "\n" " :return: The weights that influence this vertex\n" " :rtype: list of floats\n" | |||
) |
PyDoc_STRVAR | ( | bpy_bmloopuv_flag__pin_uv_doc | , |
"UV pin state.\n\n:type: boolean" | |||
) |
PyDoc_STRVAR | ( | bpy_bmloopuv_flag__select_doc | , |
"UV select state.\n\n:type: boolean" | |||
) |
PyDoc_STRVAR | ( | bpy_bmloopuv_flag__select_edge_doc | , |
"UV edge select state.\n\n:type: boolean" | |||
) |
PyDoc_STRVAR | ( | bpy_bmloopuv_uv_doc | , |
"Loops UV (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`" | |||
) |
PyDoc_STRVAR | ( | bpy_bmvertskin_flag__use_loose_doc | , |
"Use loose vertex.\n\n:type: boolean" | |||
) |
PyDoc_STRVAR | ( | bpy_bmvertskin_flag__use_root_doc | , |
"Use as root vertex. Setting this flag does not clear other roots in the same mesh " "island.\n\n:type: boolean" | |||
) |
PyDoc_STRVAR | ( | bpy_bmvertskin_radius_doc | , |
"Vert skin radii (as a 2D Vector).\n\n:type: :class:`mathutils.Vector`" | |||
) |
|
static |
Definition at line 505 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmdvert().
|
static |
Definition at line 488 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmdvert().
|
static |
Definition at line 616 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmdvert().
PyTypeObject BPy_BMDeformVert_Type |
Definition at line 633 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmdvert(), BPy_BMDeformVert_CreatePyObject(), and BPyInit_bmesh_types().
|
static |
Definition at line 84 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmloopuv().
PyTypeObject BPy_BMLoopUV_Type |
Definition at line 106 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmloopuv(), BPy_BMLoopUV_CreatePyObject(), and BPyInit_bmesh_types().
|
static |
Definition at line 199 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmvertskin().
|
static |
Definition at line 220 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmvertskin(), and BPy_BMVertSkin_CreatePyObject().
|
static |
Definition at line 321 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmloopcol().
|
static |
Definition at line 277 of file bmesh_py_types_meshdata.c.
Referenced by bm_init_types_bmloopcol(), and BPy_BMLoopColor_CreatePyObject().