PyAPI: utility function to print reports

This commit is contained in:
2019-03-27 14:01:25 +11:00
parent fb7f157ff8
commit 9f2665b526
3 changed files with 15 additions and 4 deletions

View File

@@ -262,10 +262,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
/* operator output is nice to have in the terminal/console too */
if (!BLI_listbase_is_empty(&reports->list)) {
Report *report;
for (report = reports->list.first; report; report = report->next) {
PySys_WriteStdout("%s: %s\n", report->typestr, report->message);
}
BPy_reports_write_stdout(reports, NULL);
}
BKE_reports_clear(reports);