User Interface: don't show macro args in tooltips
was often making much too big strings to show in a tip.
This commit is contained in:
@@ -313,6 +313,7 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
|
||||
char *opname;
|
||||
PyObject *kw = NULL; /* optional args */
|
||||
int all_args = 1;
|
||||
int macro_args = 1;
|
||||
int error_val = 0;
|
||||
|
||||
char *buf = NULL;
|
||||
@@ -325,7 +326,7 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s|O!i:_bpy.ops.as_string", &opname, &PyDict_Type, &kw, &all_args))
|
||||
if (!PyArg_ParseTuple(args, "s|O!ii:_bpy.ops.as_string", &opname, &PyDict_Type, &kw, &all_args, ¯o_args))
|
||||
return NULL;
|
||||
|
||||
ot = WM_operatortype_find(opname, true);
|
||||
@@ -345,7 +346,7 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args)
|
||||
error_val = pyrna_pydict_to_props(&ptr, kw, 0, "Converting py args to operator properties: ");
|
||||
|
||||
if (error_val == 0)
|
||||
buf = WM_operator_pystring_ex(C, NULL, all_args, ot, &ptr);
|
||||
buf = WM_operator_pystring_ex(C, NULL, all_args, macro_args, ot, &ptr);
|
||||
|
||||
WM_operator_properties_free(&ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user