Files
test2/source/blender/animrig/ANIM_rna.hh
Christoph Lendenfeld bf96f6cda9 Fix: failing unit tests due to "stack-use-after-scope"
The return value of `get_rotation_mode_path` was stored in a
`blender::StringRef` which caused the memory of the string to
be freed to early.

Fix by returning a `blender::StringRef`

Interestingly this seems to be only an issue on ASAN builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/116434
2023-12-21 19:40:45 +01:00

25 lines
651 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup animrig
*
* \brief Helper functions for animation to interact with the RNA system.
*/
#include "BLI_string_ref.hh"
#include "BLI_vector.hh"
#include "DNA_action_types.h"
#include "RNA_types.hh"
namespace blender::animrig {
/** Get the values of the given property. Casts non-float properties to float. */
Vector<float> get_rna_values(PointerRNA *ptr, PropertyRNA *prop);
/** Get the rna path for the given rotation mode. */
StringRef get_rotation_mode_path(eRotationModes rotation_mode);
} // namespace blender::animrig