Blender V5.3
gpu_py.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
14
15namespace blender {
16
19
20/* Docstring Literal types for shared enums. */
21
22#define PYDOC_PRIMTYPE_LITERAL \
23 "Literal[" \
24 "'POINTS', " \
25 "'LINES', " \
26 "'TRIS', " \
27 "'LINE_STRIP', " \
28 "'LINE_LOOP', " \
29 "'TRI_STRIP', " \
30 "'TRI_FAN', " \
31 "'LINES_ADJ', " \
32 "'TRIS_ADJ', " \
33 "'LINE_STRIP_ADJ']"
34#define PYDOC_DATAFORMAT_LITERAL \
35 "Literal[" \
36 "'FLOAT', " \
37 "'INT', " \
38 "'UINT', " \
39 "'UBYTE', " \
40 "'UINT_24_8', " \
41 "'10_11_11_REV']"
42
43[[nodiscard]] bool bpygpu_is_init_or_error();
44
45#define BPYGPU_IS_INIT_OR_ERROR_OBJ \
46 if (!bpygpu_is_init_or_error()) [[unlikely]] { \
47 return NULL; \
48 } \
49 ((void)0)
50#define BPYGPU_IS_INIT_OR_ERROR_INT \
51 if (!bpygpu_is_init_or_error()) [[unlikely]] { \
52 return -1; \
53 } \
54 ((void)0)
55
56} // namespace blender
BMesh Iterators.
PyC_StringEnumItems bpygpu_dataformat_items[]
Definition gpu_py.cc:42
PyC_StringEnumItems bpygpu_primtype_items[]
Definition gpu_py.cc:28
bool bpygpu_is_init_or_error()
Definition gpu_py.cc:58