|
Blender
V2.93
|
#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 | |
| char * | BPy_enum_as_string (const EnumPropertyItem *item) |
| 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 *error_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.
| char* BPy_enum_as_string | ( | const EnumPropertyItem * | item | ) |
Definition at line 41 of file bpy_capi_utils.c.
References BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), and EnumPropertyItem::identifier.
Referenced by pyop_call(), pyop_poll(), pyrna_enum_as_string(), and pyrna_enum_value_from_id().
| bool BPy_errors_to_report | ( | ReportList * | reports | ) |
Definition at line 159 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 * | error_prefix, | ||
| const bool | use_full, | ||
| const bool | use_location | ||
| ) |
Definition at line 91 of file bpy_capi_utils.c.
References BKE_report(), BKE_reportf(), NULL, PyC_ExceptionBuffer(), PyC_ExceptionBuffer_Simple(), PyC_FileAndNum(), RPT_ERROR, and TIP_.
Referenced by BPy_errors_to_report().
| short BPy_reports_to_error | ( | ReportList * | reports, |
| PyObject * | exception, | ||
| const bool | clear | ||
| ) |
Definition at line 59 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 | ||
| ) |
A version of BKE_report_write_file_fp that uses Python's stdout.
Definition at line 80 of file bpy_capi_utils.c.
References ReportList::list, and LISTBASE_FOREACH.
Referenced by pyop_call(), and pyrna_register_class().