380 Slot &slot_allocate();
390 void slot_name_ensure_prefix(
Slot &
slot);
393 "DNA struct and its C++ wrapper must have the same size");
429 memcpy(
this, &other,
sizeof(*
this));
450 static Strip &create(
Action &owning_action,
const Strip::Type type);
460 return Type(this->strip_type);
463 bool is_infinite()
const;
464 bool contains_frame(
float frame_time)
const;
465 bool is_last_frame(
float frame_time)
const;
482 template<
typename T>
const T &
data(
const Action &owning_action)
const;
493 "DNA struct and its C++ wrapper must have the same size");
535 return static_cast<Flags>(this->layer_flags);
553 return static_cast<MixMode>(this->layer_mix_mode);
565 Strip &strip_add(
Action &owning_action, Strip::Type strip_type);
575 bool strip_remove(
Action &owning_action,
Strip &strip);
589 "DNA struct and its C++ wrapper must have the same size");
617 void blend_read_post();
628 constexpr static int name_length_min = 3;
639 std::string name_prefix_for_idtype()
const;
649 bool is_suitable_for(
const ID &animated_id)
const;
652 bool has_idtype()
const;
666 bool is_expanded()
const;
667 void set_expanded(
bool expanded);
668 bool is_selected()
const;
669 void set_selected(
bool selected);
670 bool is_active()
const;
693 void users_add(
ID &animated_id);
701 void users_remove(
ID &animated_id);
712 static void users_invalidate(
Main &bmain);
723 void name_ensure_prefix();
728 void set_active(
bool active);
731 "DNA struct and its C++ wrapper must have the same size");
740 static constexpr Strip::Type TYPE = Strip::Type::Keyframe;
781 bool channelbag_remove(
ChannelBag &channelbag_to_remove);
801 "DNA struct and its C++ wrapper must have the same size");
860 void fcurve_append(
FCurve &fcurve);
875 bool fcurve_remove(
FCurve &fcurve_to_remove);
885 void fcurve_remove_by_index(
int64_t fcurve_array_index);
900 bool fcurve_detach(
FCurve &fcurve_to_detach);
910 void fcurve_detach_by_index(
int64_t fcurve_array_index);
921 void fcurve_move(
FCurve &fcurve,
int to_fcurve_index);
926 void fcurves_clear();
952 int channel_group_containing_index(
int fcurve_array_index);
998 void channel_group_move(
bActionGroup &group,
int to_group_index);
1022 bool fcurve_ungroup(
FCurve &fcurve);
1056 void channel_group_remove_raw(
int group_index);
1099 void restore_channel_group_invariants();
1103 "DNA struct and its C++ wrapper must have the same size");
1123 bool is_legacy()
const;
1133 "DNA struct and its C++ wrapper must have the same size");
1282 Slot *slot_to_assign,
1351 FCurveDescriptor fcurve_descriptor);
1370 FCurveDescriptor fcurve_descriptor);
1441 FCurve &fcurve_to_attach,
1442 std::optional<StringRefNull> group_name);
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
#define ATTR_WARN_UNUSED_RESULT
#define ENUM_OPERATORS(_type, _max)
void slot_active_set(slot_handle_t slot_handle)
Slot & slot_add_for_id(const ID &animated_id)
float2 get_frame_range_of_slot(slot_handle_t slot_handle) const ATTR_WARN_UNUSED_RESULT
void slot_name_define(Slot &slot, StringRefNull new_name)
void layer_keystrip_ensure()
Slot * slot_find_by_name(StringRefNull slot_name)
float2 get_frame_range() const ATTR_WARN_UNUSED_RESULT
bool is_cyclic() const ATTR_WARN_UNUSED_RESULT
int strip_keyframe_data_append(StripKeyframeData *strip_data)
const Layer * layer(int64_t index) const
void slot_name_propagate(Main &bmain, const Slot &slot)
int64_t find_slot_index(const Slot &slot) const
Layer * get_layer_for_keyframing()
const Slot * slot(int64_t index) const
blender::Span< const Layer * > layers() const
bool is_action_legacy() const
bool is_action_layered() const
bool has_keyframes(slot_handle_t action_slot_handle) const ATTR_WARN_UNUSED_RESULT
Slot * find_suitable_slot_for(const ID &animated_id)
void strip_keyframe_data_remove_if_unused(int index)
void slot_name_set(Main &bmain, Slot &slot, StringRefNull new_name)
int64_t find_layer_index(const Layer &layer) const
Action(const Action &other)=delete
blender::Span< const Slot * > slots() const
bool layer_remove(Layer &layer_to_remove)
float2 get_frame_range_of_keys(bool include_modifiers) const ATTR_WARN_UNUSED_RESULT
bool slot_remove(Slot &slot_to_remove)
Slot * slot_for_handle(slot_handle_t handle)
bool has_single_frame() const ATTR_WARN_UNUSED_RESULT
Span< const StripKeyframeData * > strip_keyframe_data() const
bool is_slot_animated(slot_handle_t slot_handle) const
void slot_setup_for_id(Slot &slot, const ID &animated_id)
Layer & layer_add(std::optional< StringRefNull > name)
Layer(const Layer &other)=delete
StripKeyframeData()=default
Strip(const Strip &other)
T & data(Action &owning_action)
const T & data(const Action &owning_action) const
void action_fcurve_attach(Action &action, slot_handle_t action_slot, FCurve &fcurve_to_attach, std::optional< StringRefNull > group_name)
bool action_fcurve_remove(Action &action, FCurve &fcu)
void assert_baklava_phase_1_invariants(const Action &action)
bool fcurve_matches_collection_path(const FCurve &fcurve, StringRefNull collection_rna_path, StringRefNull data_name)
Vector< FCurve * > fcurves_in_action_slot_filtered(bAction *act, slot_handle_t slot_handle, FunctionRef< bool(const FCurve &fcurve)> predicate)
Slot * assign_action_ensure_slot_for_keying(Action &action, ID &animated_id)
FCurve * action_fcurve_ensure(Main *bmain, bAction *act, const char group[], PointerRNA *ptr, FCurveDescriptor fcurve_descriptor)
FCurve * fcurve_find_in_assigned_slot(AnimData &adt, FCurveDescriptor fcurve_descriptor)
void action_fcurve_move(Action &action_dst, slot_handle_t action_slot_dst, Action &action_src, FCurve &fcurve)
Action & action_add(Main &bmain, StringRefNull name)
void action_deselect_keys(Action &action)
slot_handle_t first_slot_handle(const ::bAction &dna_action)
ID * action_slot_get_id_best_guess(Main &bmain, Slot &slot, ID *primary_id)
const FCurve * fcurve_find(Span< const FCurve * > fcurves, FCurveDescriptor fcurve_descriptor)
ActionSlotAssignmentResult generic_assign_action_slot(Slot *slot_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_name) ATTR_WARN_UNUSED_RESULT
FCurve * fcurve_find_in_action_slot(bAction *act, slot_handle_t slot_handle, FCurveDescriptor fcurve_descriptor)
bool generic_assign_action(ID &animated_id, bAction *action_to_assign, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_name)
ActionSlotAssignmentResult assign_action_and_slot(Action *action, Slot *slot_to_assign, ID &animated_id)
Span< FCurve * > fcurves_for_action_slot(Action &action, slot_handle_t slot_handle)
ID * action_slot_get_id_for_keying(Main &bmain, Action &action, slot_handle_t slot_handle, ID *primary_id)
bool is_action_assignable_to(const bAction *dna_action, ID_Type id_code) ATTR_WARN_UNUSED_RESULT
void deselect_keys_actions(blender::Span< bAction * > actions)
decltype(::ActionSlot::handle) slot_handle_t
Action * get_action(ID &animated_id)
bool assign_tmpaction(bAction *action, OwnedAnimData owned_adt)
Action * convert_to_layered_action(Main &bmain, const Action &legacy_action)
bool unassign_action(ID &animated_id)
ActionSlotAssignmentResult generic_assign_action_slot_handle(slot_handle_t slot_handle_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_name) ATTR_WARN_UNUSED_RESULT
bool action_fcurve_detach(Action &action, FCurve &fcurve_to_detach)
bool assign_action(bAction *action, ID &animated_id)
std::optional< std::pair< Action *, Slot * > > get_action_slot_pair(ID &animated_id)
FCurve * fcurve_find_in_action(bAction *act, FCurveDescriptor fcurve_descriptor)
ActionSlotAssignmentResult assign_action_slot(Slot *slot_to_assign, ID &animated_id)
const animrig::ChannelBag * channelbag_for_action_slot(const Action &action, slot_handle_t slot_handle)
void move_slot(Main &bmain, Slot &slot, Action &from_action, Action &to_action)
ActionSlotAssignmentResult
char action_slot_name[66]