17 for (
Strip *strip : layer->strips()) {
18 if (strip->type() == Strip::Type::Keyframe) {
29 if (action.
slots().is_empty()) {
47 if (action.
slots().is_empty()) {
51 slot = action.
slot(0);
63template<
typename ActionType,
67 typename StripKeyframeDataType,
68 typename ChannelBagType>
71#ifdef WITH_ANIM_BAKLAVA
73 if (action.is_action_legacy()) {
77 legacy_fcurves.
append(fcurve);
79 return legacy_fcurves;
80#ifdef WITH_ANIM_BAKLAVA
87 for (LayerType *layer : action.layers()) {
88 for (StripType *strip : layer->strips()) {
89 switch (strip->type()) {
90 case Strip::Type::Keyframe: {
92 for (ChannelBagType *bag : strip_data.channelbags()) {
93 for (FCurveType *fcurve : bag->fcurves()) {
94 all_fcurves.
append(fcurve);
128template<
typename ActionType,
132 typename StripKeyframeDataType,
133 typename ChannelBagType>
137#ifndef WITH_ANIM_BAKLAVA
141#ifdef WITH_ANIM_BAKLAVA
143 if (action.is_action_legacy()) {
146#ifdef WITH_ANIM_BAKLAVA
178 const ChannelBag>(action->wrap(), slot_handle);
183 if (!adt || !adt->
action) {
190 if (!adt || !adt->
action) {
199 if (adt ==
nullptr || adt->
action ==
nullptr) {
218 Action &action_wrap = action->wrap();
220#ifdef WITH_ANIM_BAKLAVA
226 legacy_groups.
append(group);
228 return legacy_groups;
229#ifdef WITH_ANIM_BAKLAVA
235 for (
Strip *strip : layer->strips()) {
236 switch (strip->type()) {
237 case Strip::Type::Keyframe: {
240 all_groups.
extend(bag->channel_groups());
252 if (!adt || !adt->
action) {
275 const Action &action_wrap = action.wrap();
278 return !may_do_layered;
292 Action &action_wrapped = action.wrap();
297 bool any_removed =
false;
299 if (!fcurve->rna_path) {
318 bool any_removed =
false;
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
void BKE_fcurve_free(FCurve *fcu)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define USER_EXPERIMENTAL_TEST(userdef, member)
constexpr bool is_empty() const
constexpr const char * c_str() const
void append(const T &value)
void extend(Span< T > array)
void layer_keystrip_ensure()
const Layer * layer(int64_t index) const
const Slot * slot(int64_t index) const
blender::Span< const Layer * > layers() const
bool is_action_legacy() const
bool has_keyframes(slot_handle_t action_slot_handle) const ATTR_WARN_UNUSED_RESULT
blender::Span< const Slot * > slots() const
const FCurve * fcurve(int64_t index) const
void fcurve_remove_by_index(int64_t fcurve_array_index)
blender::Span< const bActionGroup * > channel_groups() const
const Strip * strip(int64_t index) const
blender::Span< const ChannelBag * > channelbags() const
const T & data(const Action &owning_action) const
ChannelBag & channelbag_ensure(Action &action)
Vector< FCurve * > fcurves_for_action_slot(bAction *action, slot_handle_t slot_handle)
static Vector< FCurveType * > fcurves_all_templated(ActionType &action)
Vector< bActionGroup * > channel_groups_for_assigned_slot(AnimData *adt)
Vector< const FCurve * > fcurves_all(const bAction *action)
static Strip * first_keyframe_strip(Action &action)
bool action_fcurves_remove(bAction &action, slot_handle_t slot_handle, StringRefNull rna_path_prefix)
Vector< FCurve * > fcurves_for_assigned_action(AnimData *adt)
ChannelBag * channelbag_get(Action &action)
bool assigned_action_has_keyframes(AnimData *adt)
Vector< bActionGroup * > channel_groups_all(bAction *action)
static Vector< FCurveType * > fcurves_for_action_slot_templated(ActionType &action, const slot_handle_t slot_handle)
bool action_treat_as_legacy(const bAction &action)
void assert_baklava_phase_1_invariants(const Action &action)
Span< FCurve * > fcurves_for_action_slot(Action &action, slot_handle_t slot_handle)
decltype(::ActionSlot::handle) slot_handle_t
const animrig::ChannelBag * channelbag_for_action_slot(const Action &action, slot_handle_t slot_handle)
Vector< T * > listbase_to_vector(ListBase &list)