Blender V5.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
8
9#pragma once
10
11#include <Python.h>
12
13#include "BLI_compiler_attrs.hh"
14
15namespace blender {
16
17#if PY_VERSION_HEX < 0x030d0000
18# error "Python 3.13 or greater is required, you'll need to update your Python."
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
51
56extern bool bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate) ATTR_NONNULL(1);
67extern bool bpy_context_set_allow_null(struct bContext *C, PyGILState_STATE *gilstate);
71extern void bpy_context_clear(struct bContext *C, const PyGILState_STATE *gilstate);
72
73} // namespace blender
#define C
Definition RandGen.cpp:29
BMesh Iterators.
void BPy_reports_write_stdout(const ReportList *reports, const char *header)
bool BPy_errors_to_report(ReportList *reports)
struct bContext * BPY_context_get()
bool bpy_context_set_allow_null(struct bContext *C, PyGILState_STATE *gilstate)
bool bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate) ATTR_NONNULL(1)
bool BPy_errors_to_report_ex(ReportList *reports, const char *error_prefix, const bool use_full, const bool use_location)
short BPy_reports_to_error(ReportList *reports, PyObject *exception, const bool clear)
void ATTR_NONNULL(1, 2)
void bpy_context_clear(struct bContext *C, const PyGILState_STATE *gilstate)