Blender V5.3
anim_rna_test.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "ANIM_rna.hh"
10
11#include "BKE_gtest_base.hh"
12
13#include "testing/testing.h"
14
16
18
20{
23 is_rotation_path(*ParsedRNAPath<>::from_string("pose.bones[\"test\"].rotation_euler")));
24
29 is_rotation_path(*ParsedRNAPath<>::from_string("pose.bones[\"test\"][\"rotation_euler\"]")));
30}
31
32TEST_F(AnimRnaTest, rotation_mode_from_path)
33{
36 get_rotation_mode_from_path(*ParsedRNAPath<>::from_string("rotation_quaternion")).value());
41 *ParsedRNAPath<>::from_string("pose.bones[\"test\"].rotation_euler"))
42 .value());
45 get_rotation_mode_from_path(*ParsedRNAPath<>::from_string("rotation_axis_angle")).value());
46
48 EXPECT_EQ(std::nullopt,
50 EXPECT_EQ(std::nullopt,
52}
53
54} // namespace blender::animrig::tests
Helper functions for animation to interact with the RNA system.
static std::optional< ParsedRNAPath > from_string(StringRefNull path)
Definition rna_path.cc:194
#define EXPECT_FALSE(result)
#define EXPECT_TRUE(result)
TEST_F(ActionIteratorsTest, iterate_all_fcurves_of_slot)
std::optional< eRotationModes > get_rotation_mode_from_path(ParsedRNAPathRef rna_path)
Definition anim_rna.cc:121
bool is_rotation_path(ParsedRNAPathRef rna_path)
Definition anim_rna.cc:165
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)