Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-31 08:40:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-31 08:40:30 +0300
commitcdefce51f5952fc826816ac1a299e55869c2fa44 (patch)
tree21b020f1f4d369c569f188c26dd18d6a169cf35d /source/blender/python/intern/bpy_util.c
parentae51e1c683358fffd8197538085efd7d161c09f9 (diff)
update python api with changes from Joshua's commit r33917. translate reports into python errors.
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r--source/blender/python/intern/bpy_util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c
index 1ce3be0a82d..fb5b2a0d399 100644
--- a/source/blender/python/intern/bpy_util.c
+++ b/source/blender/python/intern/bpy_util.c
@@ -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