UI: add back Layout.introspect
Add back this function, removed 2e14b7fb97.
Useful for checking operators used in menus.
This commit is contained in:
@@ -9010,11 +9010,12 @@ void pyrna_struct_type_extend_capi(struct StructRNA *srna,
|
||||
py_method = PyClassMethod_New(cfunc);
|
||||
Py_DECREF(cfunc);
|
||||
}
|
||||
else {
|
||||
/* Currently only static and class methods are used. */
|
||||
BLI_assert(method->ml_flags & METH_STATIC);
|
||||
else if (method->ml_flags & METH_STATIC) {
|
||||
py_method = PyCFunction_New(method, NULL);
|
||||
}
|
||||
else {
|
||||
py_method = PyDescr_NewMethod(type, method);
|
||||
}
|
||||
|
||||
const int err = PyDict_SetItemString(dict, method->ml_name, py_method);
|
||||
Py_DECREF(py_method);
|
||||
|
||||
Reference in New Issue
Block a user