wrap RNA's RNA_property_collection_clear from python.

This commit is contained in:
2012-04-02 11:28:26 +00:00
parent 86c68c0569
commit c563eb71b7

View File

@@ -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}
};