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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-29 17:44:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-29 17:44:30 +0400
commit20e233043470c05fce0e1b78fbce141a8275133c (patch)
tree3417beebcbb0ac3c6b9a0e2ecbeb5ec173243962 /source/blender/python
parentf87c5b3453a779ebe96afff734c0ca6da1a03f8d (diff)
added Mesh.calc_tessface(), needed to update mesh tessface after bmesh edits.
also add py api BMDeformVert.clear()
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index db8cc24ff0c..9972ff288b2 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -525,12 +525,26 @@ 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)
+{
+ defvert_clear(self->data);
+
+ Py_RETURN_NONE;
+}
+
static struct PyMethodDef bpy_bmdeformvert_methods[] = {
{"keys", (PyCFunction)bpy_bmdeformvert_keys, METH_NOARGS, bpy_bmdeformvert_keys_doc},
{"values", (PyCFunction)bpy_bmdeformvert_values, METH_NOARGS, bpy_bmdeformvert_values_doc},
{"items", (PyCFunction)bpy_bmdeformvert_items, METH_NOARGS, bpy_bmdeformvert_items_doc},
{"get", (PyCFunction)bpy_bmdeformvert_get, METH_VARARGS, bpy_bmdeformvert_get_doc},
- /* BMESH_TODO */
+ /* BMESH_TODO pop, popitem, update */
+ {"clear", (PyCFunction)bpy_bmdeformvert_clear, METH_NOARGS, bpy_bmdeformvert_clear_doc},
{NULL, NULL, 0, NULL}
};
@@ -586,3 +600,4 @@ void BPy_BM_init_types_meshdata(void)
bm_init_types_bmloopcol();
bm_init_types_bmdvert();
}
+