Revision: 45339
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45339
Author: campbellbarton
Date: 2012-04-02 11:28:26 +0000 (Mon, 02 Apr 2012)
Log Message:
-----------
wrap RNA's RNA_property_collection_clear from python.
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_rna.c
Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c 2012-04-02
11:04:24 UTC (rev 45338)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c 2012-04-02
11:28:26 UTC (rev 45339)
@@ -3869,6 +3869,13 @@
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_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}
};
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs