Refactor: Clarify code around scheduling composite nodes
[blender.git] / source / blender / python / intern / bpy_props.hh
blob31262fd2f5a6d19cbab20a87424bc370ffd67c56
1 /* SPDX-FileCopyrightText: 2023 Blender Authors
3 * SPDX-License-Identifier: GPL-2.0-or-later */
5 /** \file
6 * \ingroup pythonintern
7 */
9 #pragma once
11 #include <Python.h>
13 struct StructRNA;
15 PyObject *BPY_rna_props();
16 /**
17 * Run this on exit, clearing all Python callback users and disable the RNA callback,
18 * as it would be called after Python has already finished.
20 void BPY_rna_props_clear_all();
22 PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw);
23 PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw);
24 StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix);
26 struct BPy_PropDeferred {
27 PyObject_HEAD
28 /**
29 * Internally a #PyCFunctionObject type.
30 * \note This isn't GC tracked, it's a function from `bpy.props` so it's not going away.
32 void *fn;
33 PyObject *kw;
36 extern PyTypeObject bpy_prop_deferred_Type;
37 #define BPy_PropDeferred_CheckTypeExact(v) (Py_TYPE(v) == &bpy_prop_deferred_Type)
39 #define PYRNA_STACK_ARRAY RNA_STACK_ARRAY