Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/bmesh/bmesh_py_types_meshdata.c
| Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | |||||
| /* Mesh Deform Vert | /* Mesh Deform Vert | ||||
| * **************** */ | * **************** */ | ||||
| /** | /** | ||||
| * This is python type wraps a deform vert as a python dictionary, | * This is python type wraps a deform vert as a python dictionary, | ||||
| * hiding the #MDeformWeight on access, since the mapping is very close, eg: | * hiding the #MDeformWeight on access, since the mapping is very close, eg: | ||||
| * | * | ||||
| * C: | * \code{.c} | ||||
| * weight = defvert_find_weight(dv, group_nr); | * weight = defvert_find_weight(dv, group_nr); | ||||
| * defvert_remove_group(dv, dw) | * defvert_remove_group(dv, dw) | ||||
| * \endcode | |||||
| * | * | ||||
| * Py: | * \code{.py} | ||||
| * weight = dv[group_nr] | * weight = dv[group_nr] | ||||
| * del dv[group_nr] | * del dv[group_nr] | ||||
| * \endcode | |||||
| * | * | ||||
| * \note: there is nothing BMesh specific here, | * \note There is nothing BMesh specific here, | ||||
| * its only that BMesh is the only part of blender that uses a hand written api like this. | * its only that BMesh is the only part of blender that uses a hand written api like this. | ||||
| * This type could eventually be used to access lattice weights. | * This type could eventually be used to access lattice weights. | ||||
| * | * | ||||
| * \note: Many of blender-api's dict-like-wrappers act like ordered dicts, | * \note Many of blender-api's dict-like-wrappers act like ordered dicts, | ||||
| * This is intentionally _not_ ordered, the weights can be in any order and it won't matter, | * This is intentionally _not_ ordered, the weights can be in any order and it won't matter, | ||||
| * the order should not be used in the api in any meaningful way (as with a python dict) | * the order should not be used in the api in any meaningful way (as with a python dict) | ||||
| * only expose as mapping, not a sequence. | * only expose as mapping, not a sequence. | ||||
| */ | */ | ||||
| #define BPy_BMDeformVert_Check(v) (Py_TYPE(v) == &BPy_BMDeformVert_Type) | #define BPy_BMDeformVert_Check(v) (Py_TYPE(v) == &BPy_BMDeformVert_Type) | ||||
| typedef struct BPy_BMDeformVert { | typedef struct BPy_BMDeformVert { | ||||
| ▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines | |||||