11#define DNA_DEPRECATED_ALLOW
33#include "RNA_prototypes.hh"
54 return has_layered_data || (!has_animato_data && !has_pre_animato_data);
84 "this function cannot handle pre-2.50 Actions");
92 Action &action = dna_action.wrap();
98 const int16_t idtype = action.
idroot;
114 blender::animrig::Strip::Type::Keyframe);
124 int fcurve_index = 0;
129 group->fcurve_range_start = fcurve_index;
132 if (fcu->grp != group) {
138 group->fcurve_range_length = fcurve_index - group->fcurve_range_start;
151 action.
curves = {
nullptr,
nullptr};
152 action.
groups = {
nullptr,
nullptr};
165 auto flag_adt = [](
ID &animated_id,
194 auto version_slot_assignment = [&](
ID &animated_id,
198 char *last_used_slot_identifier) {
200 Action &action = dna_action->wrap();
213 if (current_slot_ptr.
data) {
225 *
reinterpret_cast<short *
>(last_used_slot_identifier) =
GS(animated_id.
name);
233 animated_id, action, last_used_slot_identifier);
234 if (!slot_to_assign) {
240 "\"%s\" is using Action \"%s\", which does not have a slot with identifier "
241 "\"%s\" or \"%s\". Manually assign the right action slot to \"%s\".\n",
244 last_used_slot_identifier,
246 animated_id.
name + 2);
251 &action.
id, &RNA_ActionSlot, slot_to_assign);
253 &action_slot_owner_ptr, &action_slot_prop, slot_to_assign_ptr,
reports);
Functions and classes to work with Actions.
Functionality to iterate an Action in various ways.
Functions for backward compatibility with the legacy Action API.
Versioning of old animation data. Most animation versioning code lives in the versioning_xxx....
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
external readfile function prototypes.
ID_Readfile_Data::Tags BLO_readfile_id_runtime_tags(ID &id)
#define DNA_DEFAULT_ACTION_LAST_SLOT_HANDLE
bool is_action_legacy() const
void slot_identifier_define(Slot &slot, StringRefNull new_identifier)
Layer & layer_add(std::optional< StringRefNull > name)
Strip & strip_add(Action &owning_action, Strip::Type strip_type)
std::string idtype_string() const
static constexpr int identifier_length_max
const T & data(const Action &owning_action) const
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
constexpr const char * DEFAULT_LEGACY_LAYER_NAME
constexpr const char * DEFAULT_LEGACY_SLOT_NAME
void convert_legacy_animato_action(bAction &dna_action)
void tag_action_user_for_slotted_actions_conversion(ID &animated_id)
bool action_is_layered(const bAction &dna_action)
void convert_legacy_action_assignments(Main &bmain, ReportList *reports)
void convert_legacy_animato_actions(Main &bmain)
void tag_action_users_for_slotted_actions_conversion(Main &bmain)
decltype(::ActionSlot::handle) slot_handle_t
bool foreach_action_slot_use_with_rna(ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *action, PointerRNA &action_slot_owner_ptr, PropertyRNA &action_slot_prop, char *last_slot_identifier)> callback)
bool foreach_action_slot_use_with_references(ID &animated_id, FunctionRef< bool(ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *last_slot_identifier)> callback)
Slot * generic_slot_for_autoassign(const ID &animated_id, Action &action, StringRefNull last_slot_identifier)
bNodeTree * node_tree_from_id(ID *id)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
struct bActionGroup ** group_array
struct FCurve ** fcurve_array
struct ID_Readfile_Data::Tags tags
struct ID_Readfile_Data * readfile_data
struct ID_Runtime runtime
struct ActionChannelbag * channelbag