Blender V4.3
bpy_capi_utils.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include <Python.h>
12
13#if PY_VERSION_HEX < 0x030b0000
14# error "Python 3.11 or greater is required, you'll need to update your Python."
15#endif
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21struct bContext;
22struct ReportList;
23
30short BPy_reports_to_error(struct ReportList *reports, PyObject *exception, bool clear);
34void BPy_reports_write_stdout(const struct ReportList *reports, const char *header);
35bool BPy_errors_to_report_ex(struct ReportList *reports,
36 const char *error_prefix,
37 bool use_full,
38 bool use_location);
48bool BPy_errors_to_report(struct ReportList *reports);
49
50struct bContext *BPY_context_get(void);
51
52extern void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate);
56extern void bpy_context_clear(struct bContext *C, const PyGILState_STATE *gilstate);
57
58#ifdef __cplusplus
59}
60#endif
short BPy_reports_to_error(struct ReportList *reports, PyObject *exception, bool clear)
void bpy_context_clear(struct bContext *C, const PyGILState_STATE *gilstate)
void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate)
struct bContext * BPY_context_get(void)
bool BPy_errors_to_report(struct ReportList *reports)
void BPy_reports_write_stdout(const struct ReportList *reports, const char *header)
bool BPy_errors_to_report_ex(struct ReportList *reports, const char *error_prefix, bool use_full, bool use_location)
static void clear(Message &msg)
Definition msgfmt.cc:218