- remove WM_operatortype_exists since its almost the same as WM_operatortype_find
- hopefully fix reported problem with MSVC.
This commit is contained in:
@@ -63,7 +63,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
|
||||
if (!PyArg_ParseTuple(args, "sO|O!s:_bpy.ops.call", &opname, &context_dict, &PyDict_Type, &kw, &context_str))
|
||||
return NULL;
|
||||
|
||||
ot= WM_operatortype_exists(opname);
|
||||
ot= WM_operatortype_find(opname, TRUE);
|
||||
|
||||
if (ot == NULL) {
|
||||
PyErr_Format( PyExc_SystemError, "Calling operator \"bpy.ops.%s\" error, could not be found", opname);
|
||||
|
||||
@@ -105,7 +105,7 @@ PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "Os:_bpy.ops.macro_define", ¯o, &opname))
|
||||
return NULL;
|
||||
|
||||
if (WM_operatortype_exists(opname) == NULL) {
|
||||
if (WM_operatortype_find(opname, TRUE) == NULL) {
|
||||
PyErr_Format(PyExc_ValueError, "Macro Define: '%s' is not a valid operator id", opname);
|
||||
return NULL;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args)
|
||||
srna= srna_from_self(macro, "Macro Define:");
|
||||
macroname = RNA_struct_identifier(srna);
|
||||
|
||||
ot = WM_operatortype_exists(macroname);
|
||||
ot = WM_operatortype_find(macroname, TRUE);
|
||||
|
||||
if (!ot) {
|
||||
PyErr_Format(PyExc_ValueError, "Macro Define: '%s' is not a valid macro or hasn't been registered yet", macroname);
|
||||
|
||||
Reference in New Issue
Block a user