Blender V5.3
ANIM_action.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10#pragma once
11
12#include "ANIM_fcurve.hh"
13#include "ANIM_keyframing.hh"
14
15#include "DNA_action_types.h"
16#include "DNA_anim_types.h"
17
18#include "BKE_action.hh"
19#include "BKE_anim_data.hh"
20
21#include "BLI_enum_flags.hh"
22#include "BLI_span.hh"
23#include "BLI_string_ref.hh"
24#include "BLI_vector.hh"
25
26#include "RNA_types.hh"
27
28#include <utility>
29
30namespace blender {
31
32struct FCurve;
33struct FCurve;
34struct ID;
35struct Main;
36struct PointerRNA;
37struct Main;
38
39namespace animrig {
40
41/* Forward declarations for the types defined later in this file. */
42class Layer;
43class Strip;
44class Slot;
45
88class Action : public bAction {
89 public:
90 Action() = default;
95 Action(const Action &other) = delete;
96
102 bool is_empty() const;
103
104 /* Action Layers access. */
107 const Layer *layer(int64_t index) const;
109
127 Layer &layer_add(std::optional<StringRefNull> name);
128
137 bool layer_remove(Layer &layer_to_remove);
138
146
147 /* Action Slot access. */
150 const Slot *slot(int64_t index) const;
152
162 const Slot *slot_for_handle(slot_handle_t handle) const;
163
174 void slot_display_name_set(Main &bmain, Slot &slot, StringRefNull new_display_name);
175
189 void slot_display_name_define(Slot &slot, StringRefNull new_display_name);
190
203 void slot_idtype_define(Slot &slot, ID_Type idtype);
204
218 void slot_identifier_set(Main &bmain, Slot &slot, StringRefNull new_identifier);
219
229 void slot_identifier_define(Slot &slot, StringRefNull new_identifier);
230
239 void slot_identifier_propagate(Main &bmain, const Slot &slot);
240
248
267 Slot &slot_add();
268
275
288 Slot &slot_add_for_id(const ID &animated_id);
289
301 bool slot_remove(Slot &slot_to_remove);
302
310 void slot_move_to_index(Slot &slot, int to_slot_index);
311
318 void slot_active_set(slot_handle_t slot_handle);
319
332
338
344 bool is_slot_animated(slot_handle_t slot_handle) const;
345
351 bool has_keyframes(slot_handle_t action_slot_handle) const ATTR_WARN_UNUSED_RESULT;
352
363
368
377
388
399
407 float2 get_frame_range_of_keys(bool include_modifiers) const ATTR_WARN_UNUSED_RESULT;
408
420 void slot_setup_for_id(Slot &slot, const ID &animated_id);
421
422 protected:
423 /* Friends for the purpose of adding/removing strip data on the action's strip
424 * data arrays. This is needed for the strip creation and removal code in
425 * `Strip` and `Layer`'s methods. */
426 friend Strip;
427 friend Layer;
428
430 int64_t find_layer_index(const Layer &layer) const;
431
433 int64_t find_slot_index(const Slot &slot) const;
434
444
460
461 private:
476 Slot &slot_allocate();
477
486 void slot_identifier_ensure_prefix(Slot &slot);
487};
488static_assert(sizeof(Action) == sizeof(bAction),
489 "DNA struct and its C++ wrapper must have the same size");
490
501class Strip : public ActionStrip {
502 public:
511 enum class Type : int8_t { Keyframe = 0 };
512
513 /* Strips typically shouldn't be directly constructed or copied, because their
514 * data is actually stored in arrays on the action, and that data also needs
515 * to be created and managed along with the strips. */
516 Strip() = delete;
517
524 explicit Strip(const Strip &other) = default;
525
544 static Strip &create(Action &owning_action, const Strip::Type type);
545
552 Type type() const
553 {
554 return Type(this->strip_type);
555 }
556
560 bool is_infinite() const;
561
567 bool contains_frame(float frame_time) const;
568
573 bool is_last_frame(float frame_time) const;
574
585 void resize(float frame_start, float frame_end);
586
599 template<typename T> const T &data(const Action &owning_action) const;
600 template<typename T> T &data(Action &owning_action);
601};
602static_assert(sizeof(Strip) == sizeof(ActionStrip),
603 "DNA struct and its C++ wrapper must have the same size");
604
620class Layer : public ActionLayer {
621 public:
622 Layer() = default;
623 Layer(const Layer &other) = delete;
624 ~Layer();
625
640
641 enum class Flags : uint8_t {
642 /* Set by default, cleared to mute. */
643 Enabled = (1 << 0),
644 };
645
646 Flags flags() const
647 {
648 return static_cast<Flags>(this->layer_flags);
649 }
650
651 enum class MixMode : int8_t {
653 Replace = 0,
657 Add = 2,
659 Subtract = 3,
662 };
663
665 {
666 return static_cast<MixMode>(this->layer_mix_mode);
667 }
668
669 /* Strip array access. */
670 Span<const Strip *> strips() const;
671 Span<Strip *> strips();
672 const Strip *strip(int64_t index) const;
673 Strip *strip(int64_t index);
674
682 Strip &strip_add(Action &owning_action, Strip::Type strip_type);
683
692 bool strip_remove(Action &owning_action, Strip &strip);
693
694 protected:
699 int64_t find_strip_index(const Strip &strip) const;
700};
701static_assert(sizeof(Layer) == sizeof(ActionLayer),
702 "DNA struct and its C++ wrapper must have the same size");
703
705
715class Slot : public ActionSlot {
716 public:
717 Slot();
718 explicit Slot(const Slot &other);
719 ~Slot();
720
728 void blend_read_post();
729
733 constexpr static slot_handle_t unassigned = 0;
734
739 constexpr static int identifier_length_min = 3;
740
741 constexpr static int identifier_length_max = MAX_ID_NAME;
744
762 std::string idtype_string() const;
763
777
787
810 bool is_suitable_for(const ID &animated_id) const;
811
818 bool has_idtype() const;
819
820 /* Flags access. */
821 enum class Flags : uint8_t {
823 Expanded = (1 << 0),
825 Selected = (1 << 1),
827 Active = (1 << 2),
828 };
829 Flags flags() const;
830 bool is_expanded() const;
831 void set_expanded(bool expanded);
832 bool is_selected() const;
833 void set_selected(bool selected);
834 bool is_active() const;
835
837 Span<ID *> users(Main &bmain) const;
838
849 Vector<ID *> runtime_users();
850
857 void users_add(ID &animated_id);
858
865 void users_remove(ID &animated_id);
866
878 static void users_invalidate(Main &bmain);
879
901 void identifier_ensure_prefix();
902
903 protected:
904 friend Action;
905
909 void set_active(bool active);
910};
911static_assert(sizeof(Slot) == sizeof(ActionSlot),
912 "DNA struct and its C++ wrapper must have the same size");
914
925 public:
926 /* Value of `Strip::type()` that corresponds to this type. */
928
929 StripKeyframeData() = default;
930 explicit StripKeyframeData(const StripKeyframeData &other);
932
933 /* Channelbag array access. */
936 const Channelbag *channelbag(int64_t index) const;
938
944 const Channelbag *channelbag_for_slot(const Slot &slot) const;
945 Channelbag *channelbag_for_slot(const Slot &slot);
946 const Channelbag *channelbag_for_slot(slot_handle_t slot_handle) const;
948
956
962
970 bool channelbag_remove(Channelbag &channelbag_to_remove);
971
975 void slot_data_remove(slot_handle_t slot_handle);
976
982 void slot_data_duplicate(slot_handle_t source_slot_handle, slot_handle_t target_slot_handle);
983
989
991 const Slot &slot,
992 const FCurveDescriptor &fcurve_descriptor,
993 float2 time_value,
994 const KeyframeSettings &settings,
995 eInsertKeyFlags insert_key_flags = INSERTKEY_NOFLAGS,
996 std::optional<float2> cycle_range = std::nullopt);
997};
998static_assert(sizeof(StripKeyframeData) == sizeof(ActionStripKeyframeData),
999 "DNA struct and its C++ wrapper must have the same size");
1000
1011 public:
1012 Channelbag() = default;
1013 explicit Channelbag(const Channelbag &other);
1014 ~Channelbag();
1015
1016 /* FCurves access. */
1019 const FCurve *fcurve(int64_t index) const;
1021
1027 const FCurve *fcurve_find(const FCurveDescriptor &fcurve_descriptor) const;
1028 FCurve *fcurve_find(const FCurveDescriptor &fcurve_descriptor);
1029
1040 FCurve &fcurve_ensure(Main *bmain, const FCurveDescriptor &fcurve_descriptor);
1041
1053 FCurve *fcurve_create_unique(Main *bmain, const FCurveDescriptor &fcurve_descriptor);
1054
1082
1088 FCurve &fcurve_clone(const FCurve &old_fcurve,
1089 StringRefNull new_path,
1090 int new_array_index,
1091 StringRef new_group_name);
1092
1106
1120 bool fcurve_remove(FCurve &fcurve_to_remove);
1121
1130 void fcurve_remove_by_index(int64_t fcurve_index);
1131
1145 bool fcurve_detach(FCurve &fcurve_to_detach);
1146
1155 void fcurve_detach_by_index(int64_t fcurve_index);
1156
1166 void fcurve_move_to_index(FCurve &fcurve, int to_fcurve_index);
1167
1174 void fcurves_clear();
1175
1176 /* Channel group access. */
1181
1190 const bActionGroup *channel_group_find(StringRef name) const;
1192
1199 int channel_group_find_index(const bActionGroup *group) const;
1200
1208 int channel_group_containing_index(int fcurve_array_index);
1209
1222
1232
1243
1254 void channel_group_move_to_index(bActionGroup &group, int to_group_index);
1255
1265
1279
1280 protected:
1293 FCurve &fcurve_create(Main *bmain, const FCurveDescriptor &fcurve_descriptor);
1294
1295 private:
1312 void channel_group_remove_raw(int group_index);
1313
1355 void restore_channel_group_invariants();
1356};
1357
1358static_assert(sizeof(Channelbag) == sizeof(ActionChannelbag),
1359 "DNA struct and its C++ wrapper must have the same size");
1360
1369 public:
1379 bool is_legacy() const;
1380
1386};
1387
1388static_assert(sizeof(ChannelGroup) == sizeof(bActionGroup),
1389 "DNA struct and its C++ wrapper must have the same size");
1390
1399Action &action_add(Main &bmain, StringRefNull name);
1400
1401/* ---------- Action & Slot Assignment --------------- */
1402
1404 OK = 0,
1405 SlotNotFromAction = 1, /* Slot does not belong to the assigned Action. */
1406 SlotNotSuitable = 2, /* Slot is not suitable for the given ID type. */
1407 MissingAction = 3, /* No Action assigned yet, so cannot assign slot. */
1408};
1409
1427[[nodiscard]] bool assign_action(bAction *action, ID &animated_id);
1428
1437[[nodiscard]] bool assign_action(bAction *action, OwnedAnimData owned_adt);
1438
1439ActionSlotAssignmentResult assign_action_slot(Slot *slot_to_assign, ID &animated_id);
1440
1450 Slot *slot_to_assign,
1451 ID &animated_id);
1452
1470[[nodiscard]] Slot *assign_action_ensure_slot_for_keying(Action &action, ID &animated_id);
1471
1475[[nodiscard]] bool assign_tmpaction(bAction *action, OwnedAnimData owned_adt);
1476
1478 bAction *action, slot_handle_t slot_handle, OwnedAnimData owned_adt);
1479
1487[[nodiscard]] bool unassign_action(ID &animated_id);
1488
1496[[nodiscard]] bool unassign_action(OwnedAnimData owned_adt);
1497
1507[[nodiscard]] bool generic_assign_action(ID &animated_id,
1508 bAction *action_to_assign,
1509 bAction *&action_ptr_ref,
1510 slot_handle_t &slot_handle_ref,
1511 char *slot_identifier);
1512
1522[[nodiscard]] ActionSlotAssignmentResult generic_assign_action_slot(Slot *slot_to_assign,
1523 ID &animated_id,
1524 bAction *&action_ptr_ref,
1525 slot_handle_t &slot_handle_ref,
1526 char *slot_identifier);
1527
1538 slot_handle_t slot_handle_to_assign,
1539 ID &animated_id,
1540 bAction *&action_ptr_ref,
1541 slot_handle_t &slot_handle_ref,
1542 char *slot_identifier);
1543
1557[[nodiscard]] Slot *generic_slot_for_autoassign(const ID &animated_id,
1558 Action &action,
1559 StringRefNull last_slot_identifier);
1560
1561/* --------------- Accessors --------------------- */
1562
1566Action *get_action(ID &animated_id);
1567
1577std::optional<std::pair<Action *, Slot *>> get_action_slot_pair(ID &animated_id);
1578
1580 slot_handle_t slot_handle);
1582
1583/* Returns all unique channelbags for this action slot combination. */
1585 slot_handle_t slot_handle);
1586
1601
1614Channelbag &action_channelbag_ensure(bAction &dna_action, ID &animated_id);
1615
1635 bAction &action,
1636 ID &animated_id,
1637 const FCurveDescriptor &fcurve_descriptor);
1638
1665 bAction *act,
1666 PointerRNA *ptr,
1667 const FCurveDescriptor &fcurve_descriptor);
1668
1677FCurve *fcurve_find_in_action(bAction *act, const FCurveDescriptor &fcurve_descriptor);
1678
1685 slot_handle_t slot_handle,
1686 const FCurveDescriptor &fcurve_descriptor);
1687
1693FCurve *fcurve_find_in_assigned_slot(AnimData &adt, const FCurveDescriptor &fcurve_descriptor);
1694
1703bool fcurve_matches_collection_path(const FCurve &fcurve,
1704 StringRefNull collection_rna_path,
1705 StringRefNull data_name);
1706
1712 bAction *act, slot_handle_t slot_handle, FunctionRef<bool(const FCurve &fcurve)> predicate);
1713
1718 FunctionRef<bool(const FCurve &fcurve)> predicate);
1719
1724Vector<FCurve *> fcurves_in_listbase_filtered(ListBaseT<FCurve> fcurves,
1725 FunctionRef<bool(const FCurve &fcurve)> predicate);
1726
1735bool action_fcurve_remove(Action &action, FCurve &fcu);
1736
1748bool action_fcurve_detach(Action &action, FCurve &fcurve_to_detach);
1749
1760void action_fcurve_attach(Action &action,
1761 slot_handle_t action_slot,
1762 FCurve &fcurve_to_attach,
1763 std::optional<StringRefNull> group_name);
1764
1779void action_fcurve_move(Action &action_dst,
1780 slot_handle_t action_slot_dst,
1781 Action &action_src,
1782 FCurve &fcurve);
1783
1798void channelbag_fcurves_move(Channelbag &channelbag_dst, Channelbag &channelbag_src);
1799
1825 Action &action,
1826 slot_handle_t slot_handle,
1827 ID *primary_id);
1828
1841ID *action_slot_get_id_best_guess(Main &bmain, Slot &slot, ID *primary_id);
1842
1854slot_handle_t first_slot_handle(const bAction &dna_action);
1855
1880void assert_baklava_phase_1_invariants(const Action &action);
1884void assert_baklava_phase_1_invariants(const Strip &strip);
1885
1895void move_slot(Main &bmain, Slot &slot, Action &from_action, Action &to_action);
1896
1904Slot &duplicate_slot(Action &action, const Slot &slot);
1905
1910
1914void action_deselect_keys(Action &action);
1915
1916} // namespace animrig
1917
1918/* Wrap functions for the DNA structs. */
1919
1920inline animrig::ChannelGroup &bActionGroup::wrap()
1921{
1922 return *reinterpret_cast<animrig::ChannelGroup *>(this);
1923}
1924inline const animrig::ChannelGroup &bActionGroup::wrap() const
1925{
1926 return *reinterpret_cast<const animrig::ChannelGroup *>(this);
1927}
1928
1929inline animrig::Action &bAction::wrap()
1930{
1931 return *reinterpret_cast<animrig::Action *>(this);
1932}
1933inline const animrig::Action &bAction::wrap() const
1934{
1935 return *reinterpret_cast<const animrig::Action *>(this);
1936}
1937
1938inline animrig::Layer &ActionLayer::wrap()
1939{
1940 return *reinterpret_cast<animrig::Layer *>(this);
1941}
1942inline const animrig::Layer &ActionLayer::wrap() const
1943{
1944 return *reinterpret_cast<const animrig::Layer *>(this);
1945}
1946
1947inline animrig::Slot &ActionSlot::wrap()
1948{
1949 return *reinterpret_cast<animrig::Slot *>(this);
1950}
1951inline const animrig::Slot &ActionSlot::wrap() const
1952{
1953 return *reinterpret_cast<const animrig::Slot *>(this);
1954}
1955
1956inline animrig::Strip &ActionStrip::wrap()
1957{
1958 return *reinterpret_cast<animrig::Strip *>(this);
1959}
1960inline const animrig::Strip &ActionStrip::wrap() const
1961{
1962 return *reinterpret_cast<const animrig::Strip *>(this);
1963}
1964
1965inline animrig::StripKeyframeData &ActionStripKeyframeData::wrap()
1966{
1967 return *reinterpret_cast<animrig::StripKeyframeData *>(this);
1968}
1969inline const animrig::StripKeyframeData &ActionStripKeyframeData::wrap() const
1970{
1971 return *reinterpret_cast<const animrig::StripKeyframeData *>(this);
1972}
1973
1974inline animrig::Channelbag &ActionChannelbag::wrap()
1975{
1976 return *reinterpret_cast<animrig::Channelbag *>(this);
1977}
1978inline const animrig::Channelbag &ActionChannelbag::wrap() const
1979{
1980 return *reinterpret_cast<const animrig::Channelbag *>(this);
1981}
1982
1983} // namespace blender
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
Blender kernel action and pose functionality.
#define MAX_ID_NAME
Definition DNA_ID.h:367
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
Span< const Slot * > slots() const
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
const Slot * slot(int64_t index) const
void slot_idtype_define(Slot &slot, ID_Type idtype)
void slot_move_to_index(Slot &slot, int to_slot_index)
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
Span< const Layer * > layers() const
Action(const Action &other)=delete
Slot & slot_add_for_id_type(ID_Type idtype)
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)
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)
FCurve & fcurve_clone(const FCurve &old_fcurve, StringRefNull new_path, int new_array_index, StringRef new_group_name)
Span< const bActionGroup * > channel_groups() const
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
Span< const FCurve * > fcurves() 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
void channel_group_move_to_index(bActionGroup &group, int to_group_index)
int channel_group_containing_index(int fcurve_array_index)
bActionGroup & channel_group_ensure(StringRefNull name)
MixMode mix_mode() const
Layer * duplicate_with_shallow_strip_copies(StringRefNull allocation_name) const
Layer(const Layer &other)=delete
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)
Span< const Channelbag * > channelbags() const
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)
bool channelbag_remove(Channelbag &channelbag_to_remove)
const Channelbag * channelbag(int64_t index) const
Strip(const Strip &other)=default
static Strip & create(Action &owning_action, const Strip::Type type)
T & data(Action &owning_action)
const T & data(const Action &owning_action) const
#define sizeof
#define layer
#define T
void action_fcurve_attach(Action &action, slot_handle_t action_slot, FCurve &fcurve_to_attach, std::optional< StringRefNull > group_name)
slot_handle_t first_slot_handle(const bAction &dna_action)
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)
decltype(blender::ActionSlot::handle) slot_handle_t
void channelbag_fcurves_move(Channelbag &channelbag_dst, Channelbag &channelbag_src)
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_ex(Main *bmain, bAction *act, PointerRNA *ptr, const 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)
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 & 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)
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)
Vector< FCurve * > fcurves_in_listbase_filtered(ListBaseT< FCurve > fcurves, FunctionRef< bool(const FCurve &fcurve)> predicate)
Vector< animrig::Channelbag * > channelbags_for_action_slot(Action &action, slot_handle_t slot_handle)
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)
Action * get_action(ID &animated_id)
bool assign_tmpaction(bAction *action, OwnedAnimData owned_adt)
bool unassign_action(ID &animated_id)
bool action_fcurve_detach(Action &action, FCurve &fcurve_to_detach)
bool assign_action(bAction *action, ID &animated_id)
ENUM_OPERATORS(Layer::Flags)
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)
void deselect_keys_actions(Span< bAction * > actions)
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)
FCurve * fcurve_find_in_action_slot(bAction *act, slot_handle_t slot_handle, const FCurveDescriptor &fcurve_descriptor)
BMesh Iterators.
__int64 int64_t
Definition BKE_text.h:90
VecBase< float, 2 > float2
unsigned char uint8_t
Definition BKE_text.h:79
bool ATTR_WARN_UNUSED_RESULT
signed char int8_t
Definition BKE_text.h:76
@ Multiply
Definition types.hh:145
char last_slot_identifier[258]
char last_slot_identifier[258]