merge with trunk/2.5 at r23876

[[Split portion of a mixed commit.]]
This commit is contained in:
2009-10-22 23:22:05 +00:00
parent 36bb566d4e
commit 8f788c64db
1313 changed files with 104799 additions and 120780 deletions

View File

@@ -65,7 +65,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
return NULL;
}
if(ot->poll && (ot->poll(C) == FALSE)) {
if(WM_operator_poll((bContext*)C, ot) == FALSE) {
PyErr_SetString( PyExc_SystemError, "bpy.__ops__.call: operator poll() function failed, context is incorrect");
return NULL;
}
@@ -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("%s\n", report_str);
MEM_freeN(report_str);
}
}
BKE_reports_clear(reports);
if ((reports->flag & RPT_FREE) == 0)
{