Files
test2/source/blender/python/intern/bpy_rna_anim.hh
Campbell Barton 6253a33aa3 Cleanup: use nodiscard attribute for functions in the Python API
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.
2025-06-28 10:15:27 +10:00

28 lines
988 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include <Python.h>
#include "intern/bpy_rna.hh"
/** \file
* \ingroup pythonintern
*/
extern char pyrna_struct_keyframe_insert_doc[];
extern char pyrna_struct_keyframe_delete_doc[];
extern char pyrna_struct_driver_add_doc[];
extern char pyrna_struct_driver_remove_doc[];
[[nodiscard]] PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self,
PyObject *args,
PyObject *kw);
[[nodiscard]] PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self,
PyObject *args,
PyObject *kw);
[[nodiscard]] PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args);
[[nodiscard]] PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args);