In most (cases functions returning a PyObject pointer requires it to be used by the caller, declare functions in the Python API with the `nodiscard` attribute.
21 lines
378 B
C++
21 lines
378 B
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup pygen
|
|
*/
|
|
|
|
#include <Python.h>
|
|
|
|
struct ImBuf;
|
|
|
|
[[nodiscard]] PyObject *BPyInit_imbuf();
|
|
|
|
extern PyTypeObject Py_ImBuf_Type;
|
|
|
|
/** Return the #ImBuf or null with an error set. */
|
|
[[nodiscard]] ImBuf *BPy_ImBuf_FromPyObject(PyObject *py_imbuf);
|