svn merge -r39286:39385 https://svn.blender.org/svnroot/bf-blender/trunk/blender
This commit is contained in:
@@ -52,6 +52,9 @@
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_ghash.h"
|
||||
|
||||
#include "BKE_report.h"
|
||||
#include "BKE_context.h"
|
||||
|
||||
@@ -359,15 +362,18 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
|
||||
|
||||
static PyObject *pyop_dir(PyObject *UNUSED(self))
|
||||
{
|
||||
GHashIterator *iter= WM_operatortype_iter();
|
||||
PyObject *list= PyList_New(0), *name;
|
||||
wmOperatorType *ot;
|
||||
|
||||
for(ot= WM_operatortype_first(); ot; ot= ot->next) {
|
||||
|
||||
for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
|
||||
wmOperatorType *ot= BLI_ghashIterator_getValue(iter);
|
||||
|
||||
name= PyUnicode_FromString(ot->idname);
|
||||
PyList_Append(list, name);
|
||||
Py_DECREF(name);
|
||||
}
|
||||
|
||||
BLI_ghashIterator_free(iter);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user