From 3fcd153d890feeeba6c099fb1c738eb4e5225e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 19 Sep 2024 14:47:59 +0200 Subject: [PATCH] Anim: fix unit test when built without experimental features The `ActionQueryTest` unit test was unconditionally creating a layered Action, which fails the test when Blender was built without experimental features. Pull Request: https://projects.blender.org/blender/blender/pulls/127840 --- source/blender/animrig/intern/action_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/animrig/intern/action_test.cc b/source/blender/animrig/intern/action_test.cc index 6fed8b812b5..cae177d7935 100644 --- a/source/blender/animrig/intern/action_test.cc +++ b/source/blender/animrig/intern/action_test.cc @@ -918,11 +918,15 @@ static void add_keyframe(FCurve &fcu, float x, float y) static void add_fcurve_to_action(Action &action, FCurve &fcu) { +#ifdef WITH_ANIM_BAKLAVA Slot &slot = action.slot_array_num > 0 ? *action.slot(0) : action.slot_add(); action.layer_keystrip_ensure(); StripKeyframeData &strip_data = action.layer(0)->strip(0)->data(action); ChannelBag &cbag = strip_data.channelbag_for_slot_ensure(slot); cbag.fcurve_append(fcu); +#else + BLI_addhead(&action.curves, &fcu); +#endif /* WITH_ANIM_BAKLAVA */ } class ActionQueryTest : public testing::Test {