Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hale <TrumanBlending@gmail.com>2013-10-27 16:16:45 +0400
committerAndrew Hale <TrumanBlending@gmail.com>2013-10-27 16:16:45 +0400
commit7be81ffaf51ce364b441ca6f5e2a8a63a2131aa7 (patch)
tree60c0345701ecbc29776447a5823a73aa4f163e6a /source/blender/python/bmesh/bmesh_py_types_customdata.c
parentdee671276dcda464dab6dce6a3904e7f373f8d88 (diff)
Expose MVertSkin customdata layer in Python. This allows scripts to change parameters which are used by the skin modifier (such as radius)
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types_customdata.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 30902c615a1..0ba08f3e8d0 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -113,6 +113,9 @@ PyDoc_STRVAR(bpy_bmlayeraccess_collection__uv_doc,
PyDoc_STRVAR(bpy_bmlayeraccess_collection__color_doc,
"Accessor for vertex color layer.\n\ntype: :class:`BMLayerCollection`"
);
+PyDoc_STRVAR(bpy_bmlayeraccess_collection__skin_doc,
+"Accessor for skin layer.\n\ntype: :class:`BMLayerCollection`"
+);
#ifdef WITH_FREESTYLE
PyDoc_STRVAR(bpy_bmlayeraccess_collection__freestyle_edge_doc,
"Accessor for Freestyle edge layer.\n\ntype: :class:`BMLayerCollection`"
@@ -192,6 +195,7 @@ static PyGetSetDef bpy_bmlayeraccess_vert_getseters[] = {
{(char *)"shape", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__shape_doc, (void *)CD_SHAPEKEY},
{(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT},
+ {(char *)"skin", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__skin_doc, (void *)CD_MVERT_SKIN},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
@@ -1030,6 +1034,11 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
ret = PyFloat_FromDouble(*(float *)value);
break;
}
+ case CD_MVERT_SKIN:
+ {
+ ret = BPy_BMVertSkin_CreatePyObject(value);
+ break;
+ }
default:
{
ret = Py_NotImplemented; /* TODO */
@@ -1147,6 +1156,11 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj
}
break;
}
+ case CD_MVERT_SKIN:
+ {
+ ret = BPy_BMVertSkin_AssignPyObject(value, py_value);
+ break;
+ }
default:
{
PyErr_SetString(PyExc_AttributeError, "readonly / unsupported type");