Changes to allow python to do redraws through the timer operator, a reliable way...
[blender.git] / source / blender / python / intern / bpy_operator.c
index f2e2dd77e6dc19ef70e7b0e3a48603aecee0f88c..301204d3e2b745abb06bd5388408e87087aa88f8 100644 (file)
@@ -89,6 +89,16 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
                if(BPy_reports_to_error(reports))
                        error_val = -1;
 
+               /* operator output is nice to have in the terminal/console too */
+               if(reports->list.first) {
+                       char *report_str= BKE_reports_string(reports, 0); /* all reports */
+
+                       if(report_str) {
+                               PySys_WriteStdout(report_str);
+                               MEM_freeN(report_str);
+                       }
+               }
+
                BKE_reports_clear(reports);
                if ((reports->flag & RPT_FREE) == 0)
                {