update python api with changes from Joshua's commit r33917. translate reports into python errors.
This commit is contained in:
@@ -138,12 +138,16 @@ char *BPy_enum_as_string(EnumPropertyItem *item)
|
||||
return cstring;
|
||||
}
|
||||
|
||||
int BPy_reports_to_error(ReportList *reports)
|
||||
short BPy_reports_to_error(ReportList *reports, const short clear)
|
||||
{
|
||||
char *report_str;
|
||||
|
||||
report_str= BKE_reports_string(reports, RPT_ERROR);
|
||||
|
||||
if(clear) {
|
||||
BKE_reports_clear(reports);
|
||||
}
|
||||
|
||||
if(report_str) {
|
||||
PyErr_SetString(PyExc_SystemError, report_str);
|
||||
MEM_freeN(report_str);
|
||||
@@ -153,7 +157,7 @@ int BPy_reports_to_error(ReportList *reports)
|
||||
}
|
||||
|
||||
|
||||
int BPy_errors_to_report(ReportList *reports)
|
||||
short BPy_errors_to_report(ReportList *reports)
|
||||
{
|
||||
PyObject *pystring;
|
||||
PyObject *pystring_format= NULL; // workaround, see below
|
||||
|
Reference in New Issue
Block a user