diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-02 15:28:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-02 15:28:26 +0400 |
commit | c563eb71b74cd31eb42f4738fc8df053af9a13c5 (patch) | |
tree | 3b47ed884a9b790ed388487139cf2c10bef0982e /source/blender/python | |
parent | 86c68c0569b3cd82a1de27470b3d4858cde96e30 (diff) |
wrap RNA's RNA_property_collection_clear from python.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 7af53b489bd..53f9e46ba13 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -3869,6 +3869,13 @@ static PyObject *pyrna_prop_collection_idprop_remove(BPy_PropertyRNA *self, PyOb Py_RETURN_NONE; } +static PyObject *pyrna_prop_collection_idprop_clear(BPy_PropertyRNA *self) +{ + RNA_property_collection_clear(&self->ptr, self->prop); + + Py_RETURN_NONE; +} + static PyObject *pyrna_prop_collection_idprop_move(BPy_PropertyRNA *self, PyObject *args) { int key = 0, pos = 0; @@ -4580,6 +4587,7 @@ static struct PyMethodDef pyrna_prop_collection_methods[] = { static struct PyMethodDef pyrna_prop_collection_idprop_methods[] = { {"add", (PyCFunction)pyrna_prop_collection_idprop_add, METH_NOARGS, NULL}, {"remove", (PyCFunction)pyrna_prop_collection_idprop_remove, METH_O, NULL}, + {"clear", (PyCFunction)pyrna_prop_collection_idprop_clear, METH_NOARGS, NULL}, {"move", (PyCFunction)pyrna_prop_collection_idprop_move, METH_VARARGS, NULL}, {NULL, NULL, 0, NULL} }; |