* was using __members__ to get a list of attributes, has been deprecated in python for a while now. use a "__dir__" method instead. now dir() works for rna and operator types.

* added array support for bpyoperator doc generation
This commit is contained in:
Campbell Barton
2008-12-29 12:04:25 +00:00
parent 2c4c7004ae
commit 3e29ff7204
5 changed files with 141 additions and 126 deletions

View File

@@ -322,7 +322,7 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata)
}
/* pyOperators - Operators defined IN Python */
static PyObject *pyop_add(PyObject *self, PyObject *args)
PyObject *PYOP_wrap_add(PyObject *self, PyObject *args)
{
PyOperatorType *pyot;
@@ -360,7 +360,7 @@ static PyObject *pyop_add(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
static PyObject *pyop_remove(PyObject *self, PyObject *args)
PyObject *PYOP_wrap_remove(PyObject *self, PyObject *args)
{
char *idname= NULL;
wmOperatorType *ot;
@@ -388,20 +388,3 @@ static PyObject *pyop_remove(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
static PyMethodDef pyop_add_methdef[] = {
{"add", pyop_add, METH_VARARGS, ""}
};
static PyMethodDef pyop_remove_methdef[] = {
{"remove", pyop_remove, METH_VARARGS, ""}
};
PyObject *PYOP_wrap_add_func( void )
{
return PyCFunction_New( pyop_add_methdef, NULL );
}
PyObject *PYOP_wrap_remove_func( void )
{
return PyCFunction_New( pyop_remove_methdef, NULL );
}