526 Slot &slot_allocate();
536 void slot_identifier_ensure_prefix(
Slot &
slot);
539 "DNA struct and its C++ wrapper must have the same size");
561 enum class Type : int8_t { Keyframe = 0 };
609 bool is_infinite()
const;
616 bool contains_frame(
float frame_time)
const;
622 bool is_last_frame(
float frame_time)
const;
648 template<
typename T>
const T &
data(
const Action &owning_action)
const;
652 "DNA struct and its C++ wrapper must have the same size");
732 Strip &strip_add(
Action &owning_action, Strip::Type strip_type);
742 bool strip_remove(
Action &owning_action,
Strip &strip);
752 "DNA struct and its C++ wrapper must have the same size");
881 bool is_expanded()
const;
882 void set_expanded(
bool expanded);
883 bool is_selected()
const;
884 void set_selected(
bool selected);
885 bool is_active()
const;
908 void users_add(
ID &animated_id);
916 void users_remove(
ID &animated_id);
929 static void users_invalidate(
Main &bmain);
952 void identifier_ensure_prefix();
963 "DNA struct and its C++ wrapper must have the same size");
978 static constexpr Strip::Type
TYPE = Strip::Type::Keyframe;
1047 std::optional<float2> cycle_range = std::nullopt);
1050 "DNA struct and its C++ wrapper must have the same size");
1353 void channel_group_remove_raw(
int group_index);
1396 void restore_channel_group_invariants();
1400 "DNA struct and its C++ wrapper must have the same size");
1430 "DNA struct and its C++ wrapper must have the same size");
1500 Slot *slot_to_assign,
1562 char *slot_identifier);
1577 char *slot_identifier);
1593 char *slot_identifier);
1687 const FCurveDescriptor &fcurve_descriptor);
1718 const FCurveDescriptor &fcurve_descriptor);
1733 const FCurveDescriptor &fcurve_descriptor);
1752 const FCurveDescriptor &fcurve_descriptor);
1838 FCurve &fcurve_to_attach,
1839 std::optional<StringRefNull> group_name);
2016inline const blender::animrig::ChannelGroup &bActionGroup::wrap()
const
2018 return *
reinterpret_cast<const blender::animrig::ChannelGroup *
>(
this);
2021inline blender::animrig::Action &bAction::wrap()
2023 return *
reinterpret_cast<blender::animrig::Action *
>(
this);
2025inline const blender::animrig::Action &bAction::wrap()
const
2027 return *
reinterpret_cast<const blender::animrig::Action *
>(
this);
2030inline blender::animrig::Layer &ActionLayer::wrap()
2032 return *
reinterpret_cast<blender::animrig::Layer *
>(
this);
2034inline const blender::animrig::Layer &ActionLayer::wrap()
const
2036 return *
reinterpret_cast<const blender::animrig::Layer *
>(
this);
2039inline blender::animrig::Slot &ActionSlot::wrap()
2041 return *
reinterpret_cast<blender::animrig::Slot *
>(
this);
2043inline const blender::animrig::Slot &ActionSlot::wrap()
const
2045 return *
reinterpret_cast<const blender::animrig::Slot *
>(
this);
2048inline blender::animrig::Strip &ActionStrip::wrap()
2050 return *
reinterpret_cast<blender::animrig::Strip *
>(
this);
2052inline const blender::animrig::Strip &ActionStrip::wrap()
const
2054 return *
reinterpret_cast<const blender::animrig::Strip *
>(
this);
2057inline blender::animrig::StripKeyframeData &ActionStripKeyframeData::wrap()
2059 return *
reinterpret_cast<blender::animrig::StripKeyframeData *
>(
this);
2061inline const blender::animrig::StripKeyframeData &ActionStripKeyframeData::wrap()
const
2063 return *
reinterpret_cast<const blender::animrig::StripKeyframeData *
>(
this);
2066inline blender::animrig::Channelbag &ActionChannelbag::wrap()
2068 return *
reinterpret_cast<blender::animrig::Channelbag *
>(
this);
2070inline const blender::animrig::Channelbag &ActionChannelbag::wrap()
const
2072 return *
reinterpret_cast<const blender::animrig::Channelbag *
>(
this);
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
Blender kernel action and pose functionality.
#define ATTR_WARN_UNUSED_RESULT
#define ENUM_OPERATORS(_type, _max)
static btMatrix3x3 Add(const btMatrix3x3 &a, const btMatrix3x3 &b)
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 layer_keystrip_ensure()
void slot_display_name_define(Slot &slot, StringRefNull new_display_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)
void slot_identifier_propagate(Main &bmain, const Slot &slot)
const Layer * layer(int64_t index) const
void slot_identifier_set(Main &bmain, Slot &slot, StringRefNull new_identifier)
int64_t find_slot_index(const Slot &slot) const
Layer * get_layer_for_keyframing()
const Slot * slot(int64_t index) const
void slot_idtype_define(Slot &slot, ID_Type idtype)
blender::Span< const Layer * > layers() const
void slot_move_to_index(Slot &slot, int to_slot_index)
bool is_action_legacy() const
bool is_action_layered() const
bool has_keyframes(slot_handle_t action_slot_handle) const ATTR_WARN_UNUSED_RESULT
void slot_display_name_set(Main &bmain, Slot &slot, StringRefNull new_display_name)
void strip_keyframe_data_remove_if_unused(int index)
int64_t find_layer_index(const Layer &layer) const
Action(const Action &other)=delete
Slot & slot_add_for_id_type(ID_Type idtype)
blender::Span< const Slot * > slots() const
bool layer_remove(Layer &layer_to_remove)
Slot * slot_find_by_identifier(StringRefNull slot_identifier)
float2 get_frame_range_of_keys(bool include_modifiers) const ATTR_WARN_UNUSED_RESULT
void slot_identifier_define(Slot &slot, StringRefNull new_identifier)
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)
Span< FCurve * > fcurves()
bool channel_group_remove(bActionGroup &group)
const FCurve * fcurve(int64_t index) const
void fcurve_remove_by_index(int64_t fcurve_index)
bool fcurve_detach(FCurve &fcurve_to_detach)
void fcurve_move_to_index(FCurve &fcurve, int to_fcurve_index)
bool fcurve_assign_to_channel_group(FCurve &fcurve, bActionGroup &to_group)
bActionGroup & channel_group_create(StringRefNull name)
bool fcurve_remove(FCurve &fcurve_to_remove)
const bActionGroup * channel_group(int64_t index) const
FCurve & fcurve_create(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
const bActionGroup * channel_group_find(StringRef name) const
Vector< FCurve * > fcurve_create_many(Main *bmain, Span< FCurveDescriptor > fcurve_descriptors)
void fcurve_detach_by_index(int64_t fcurve_index)
int channel_group_find_index(const bActionGroup *group) const
FCurve & fcurve_ensure(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
FCurve * fcurve_create_unique(Main *bmain, const FCurveDescriptor &fcurve_descriptor)
const FCurve * fcurve_find(const FCurveDescriptor &fcurve_descriptor) const
bool fcurve_ungroup(FCurve &fcurve)
void fcurve_append(FCurve &fcurve)
blender::Span< const FCurve * > fcurves() const
void channel_group_move_to_index(bActionGroup &group, int to_group_index)
int channel_group_containing_index(int fcurve_array_index)
blender::Span< const bActionGroup * > channel_groups() const
bActionGroup & channel_group_ensure(StringRefNull name)
Layer * duplicate_with_shallow_strip_copies(StringRefNull allocation_name) const
Layer(const Layer &other)=delete
StringRef identifier_prefix() const
void set_active(bool active)
bool is_suitable_for(const ID &animated_id) const
std::string idtype_string() const
static constexpr int identifier_length_min
static constexpr int identifier_length_max
static constexpr slot_handle_t unassigned
StringRefNull identifier_without_prefix() const
const Channelbag * channelbag_for_slot(const Slot &slot) const
int64_t find_channelbag_index(const Channelbag &channelbag) const
void slot_data_remove(slot_handle_t slot_handle)
void slot_data_duplicate(slot_handle_t source_slot_handle, slot_handle_t target_slot_handle)
static constexpr Strip::Type TYPE
Channelbag & channelbag_for_slot_add(const Slot &slot)
SingleKeyingResult keyframe_insert(Main *bmain, const Slot &slot, const FCurveDescriptor &fcurve_descriptor, float2 time_value, const KeyframeSettings &settings, eInsertKeyFlags insert_key_flags=INSERTKEY_NOFLAGS, std::optional< float2 > cycle_range=std::nullopt)
Channelbag & channelbag_for_slot_ensure(const Slot &slot)
blender::Span< const Channelbag * > channelbags() const
bool channelbag_remove(Channelbag &channelbag_to_remove)
const Channelbag * channelbag(int64_t index) const
StripKeyframeData()=default
Strip(const Strip &other)=default
T & data(Action &owning_action)
const T & data(const Action &owning_action) const
static Strip & create(Action &owning_action, const Strip::Type type)
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)
void channelbag_fcurves_move(Channelbag &channelbag_dst, Channelbag &channelbag_src)
Vector< FCurve * > fcurves_in_listbase_filtered(ListBase fcurves, FunctionRef< bool(const FCurve &fcurve)> predicate)
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)
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)
const animrig::Channelbag * channelbag_for_action_slot(const Action &action, slot_handle_t slot_handle)
ActionSlotAssignmentResult assign_tmpaction_and_slot_handle(bAction *action, slot_handle_t slot_handle, OwnedAnimData owned_adt)
slot_handle_t first_slot_handle(const ::bAction &dna_action)
Slot & duplicate_slot(Action &action, const Slot &slot)
Vector< FCurve * > fcurves_in_span_filtered(Span< FCurve * > fcurves, FunctionRef< bool(const FCurve &fcurve)> predicate)
bool generic_assign_action(ID &animated_id, bAction *action_to_assign, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier)
FCurve * action_fcurve_ensure_legacy(Main *bmain, bAction *act, const char group[], PointerRNA *ptr, const FCurveDescriptor &fcurve_descriptor)
ID * action_slot_get_id_best_guess(Main &bmain, Slot &slot, ID *primary_id)
ActionSlotAssignmentResult generic_assign_action_slot(Slot *slot_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier)
ActionSlotAssignmentResult assign_action_and_slot(Action *action, Slot *slot_to_assign, ID &animated_id)
decltype(::ActionSlot::handle) slot_handle_t
bool is_action_assignable_to(const bAction *dna_action, ID_Type id_code)
Channelbag & action_channelbag_ensure(bAction &dna_action, 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)
void deselect_keys_actions(blender::Span< bAction * > actions)
Action * get_action(ID &animated_id)
bool assign_tmpaction(bAction *action, OwnedAnimData owned_adt)
FCurve * action_fcurve_ensure_ex(Main *bmain, bAction *act, const char group[], PointerRNA *ptr, const FCurveDescriptor &fcurve_descriptor)
Action * convert_to_layered_action(Main &bmain, const Action &legacy_action)
bool unassign_action(ID &animated_id)
bool action_fcurve_detach(Action &action, FCurve &fcurve_to_detach)
bool assign_action(bAction *action, ID &animated_id)
FCurve * fcurve_find_in_assigned_slot(AnimData &adt, const FCurveDescriptor &fcurve_descriptor)
std::optional< std::pair< Action *, Slot * > > get_action_slot_pair(ID &animated_id)
FCurve & action_fcurve_ensure(Main *bmain, bAction &action, ID &animated_id, const FCurveDescriptor &fcurve_descriptor)
FCurve * fcurve_find_in_action(bAction *act, const FCurveDescriptor &fcurve_descriptor)
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_identifier)
ActionSlotAssignmentResult assign_action_slot(Slot *slot_to_assign, ID &animated_id)
void move_slot(Main &bmain, Slot &slot, Action &from_action, Action &to_action)
Slot * generic_slot_for_autoassign(const ID &animated_id, Action &action, StringRefNull last_slot_identifier)
ActionSlotAssignmentResult
FCurve * fcurve_find_in_action_slot(bAction *act, slot_handle_t slot_handle, const FCurveDescriptor &fcurve_descriptor)
VecBase< float, 2 > float2
char last_slot_identifier[258]
char last_slot_identifier[258]