Blender
V3.3
|
#include <Python.h>
#include "BLI_dynstr.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "bpy_capi_utils.h"
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "BLT_translation.h"
#include "../generic/py_capi_utils.h"
Go to the source code of this file.
Functions | |
short | BPy_reports_to_error (ReportList *reports, PyObject *exception, const bool clear) |
void | BPy_reports_write_stdout (const ReportList *reports, const char *header) |
bool | BPy_errors_to_report_ex (ReportList *reports, const char *err_prefix, const bool use_full, const bool use_location) |
bool | BPy_errors_to_report (ReportList *reports) |
This file contains Blender/Python utility functions to help implementing API's. This is not related to a particular module.
Definition in file bpy_capi_utils.c.
bool BPy_errors_to_report | ( | struct ReportList * | reports | ) |
reports | When set, an error will be added to this report, when NULL, print the error. |
stdout/stderr
: Definition at line 113 of file bpy_capi_utils.c.
References BPy_errors_to_report_ex(), and NULL.
Referenced by bpy_class_call(), bpy_run_string_impl(), Freestyle::PythonInterpreter::interpretString(), and python_script_exec().
bool BPy_errors_to_report_ex | ( | ReportList * | reports, |
const char * | err_prefix, | ||
const bool | use_full, | ||
const bool | use_location | ||
) |
Definition at line 56 of file bpy_capi_utils.c.
References BKE_report(), BKE_reportf(), NULL, PyC_ExceptionBuffer(), PyC_ExceptionBuffer_Simple(), PyC_FileAndNum(), and RPT_ERROR.
Referenced by BPy_errors_to_report().
short BPy_reports_to_error | ( | ReportList * | reports, |
PyObject * | exception, | ||
const bool | clear | ||
) |
Definition at line 27 of file bpy_capi_utils.c.
References BKE_reports_clear(), BKE_reports_string(), clear(), MEM_freeN, NULL, and RPT_ERROR.
Referenced by bpy_lib_enter(), bpy_lib_write(), pyop_call(), pyrna_func_call(), pyrna_py_to_prop(), pyrna_register_class(), pyrna_struct_driver_add(), pyrna_struct_driver_remove(), pyrna_struct_keyframe_delete(), and pyrna_struct_keyframe_insert().
void BPy_reports_write_stdout | ( | const ReportList * | reports, |
const char * | header | ||
) |
Definition at line 45 of file bpy_capi_utils.c.
References ReportList::list, and LISTBASE_FOREACH.
Referenced by pyop_call(), and pyrna_register_class().