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:
Diffstat (limited to 'source/blender/python/intern/bpy_capi_utils.c')
-rw-r--r--source/blender/python/intern/bpy_capi_utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_capi_utils.c b/source/blender/python/intern/bpy_capi_utils.c
index 4c0d220d3d9..3a5b3077ee6 100644
--- a/source/blender/python/intern/bpy_capi_utils.c
+++ b/source/blender/python/intern/bpy_capi_utils.c
@@ -75,6 +75,19 @@ short BPy_reports_to_error(ReportList *reports, PyObject *exception, const bool
return (report_str == NULL) ? 0 : -1;
}
+/**
+ * A version of #BKE_report_write_file_fp that uses Python's stdout.
+ */
+void BPy_reports_write_stdout(const ReportList *reports, const char *header)
+{
+ if (header) {
+ PySys_WriteStdout("%s\n", header);
+ }
+
+ for (const Report *report = reports->list.first; report; report = report->next) {
+ PySys_WriteStdout("%s: %s\n", report->typestr, report->message);
+ }
+}
bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const bool use_location)
{