19#include "testing/testing.h"
79 bAction *action = create_empty_action();
89#ifdef WITH_ANIM_BAKLAVA
90TEST_F(ActionLegacyTest, fcurves_all_layered)
92 Action &action = create_empty_action()->wrap();
103 Vector<FCurve *> fcurves_expect = {&fcurve1, &fcurve2};
123 bAction *action = create_empty_action();
133#ifdef WITH_ANIM_BAKLAVA
134TEST_F(ActionLegacyTest, fcurves_for_action_slot_layered)
136 Action &action = create_empty_action()->wrap();
147 Vector<FCurve *> fcurve1_expect = {&fcurve1};
148 Vector<FCurve *> fcurve2_expect = {&fcurve2};
157 bAction *action = create_empty_action();
162 bAction *action = create_empty_action();
163 FCurve *fcurve_loc_x = fcurve_add_legacy(action,
"location", 0);
164 fcurve_add_legacy(action,
"rotation_euler", 2);
165 fcurve_add_legacy(action,
"rotation_mode", 0);
166 FCurve *fcurve_loc_y = fcurve_add_legacy(action,
"location", 1);
174#ifdef WITH_ANIM_BAKLAVA
175TEST_F(ActionLegacyTest, action_fcurves_remove_layered)
179 Action &action = create_empty_action()->wrap();
202 Vector<FCurve *> fcurves_bag_1_expect = {&fcurve_loc_x, &fcurve_loc_y};
206 <<
"Expected all F-Curves for slot 2 to be there after manipulating slot 1";
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
void BKE_fcurve_rnapath_set(FCurve &fcu, blender::StringRef rna_path)
void * BKE_id_new(Main *bmain, short type, const char *name)
Main * BKE_main_new(void)
void BKE_main_free(Main *bmain)
General operations, lookup, etc. for blender objects.
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Object is a sort of wrapper for general info.
void layer_keystrip_ensure()
const Layer * layer(int64_t index) const
Span< const StripKeyframeData * > strip_keyframe_data() const
FCurve & fcurve_ensure(Main *bmain, FCurveDescriptor fcurve_descriptor)
blender::Span< const FCurve * > fcurves() const
const Strip * strip(int64_t index) const
static constexpr slot_handle_t unassigned
ChannelBag & channelbag_for_slot_ensure(const Slot &slot)
const T & data(const Action &owning_action) const
bAction * create_empty_action()
static void SetUpTestSuite()
static void TearDownTestSuite()
FCurve * fcurve_add_legacy(bAction *action, const StringRefNull rna_path, const int array_index)
void *(* MEM_callocN)(size_t len, const char *str)
Vector< FCurve * > fcurves_for_action_slot(bAction *action, slot_handle_t slot_handle)
Vector< const FCurve * > fcurves_all(const bAction *action)
bool action_fcurves_remove(bAction &action, slot_handle_t slot_handle, StringRefNull rna_path_prefix)
TEST_F(ActionIteratorsTest, iterate_all_fcurves_of_slot)
Span< FCurve * > fcurves_for_action_slot(Action &action, slot_handle_t slot_handle)