11#define DNA_DEPRECATED_ALLOW
34#include "RNA_prototypes.hh"
54 return has_layered_data || !has_animato_data;
77 Action &action = dna_action.wrap();
83 const int16_t idtype = action.
idroot;
99 blender::animrig::Strip::Type::Keyframe);
109 int fcurve_index = 0;
114 group->fcurve_range_start = fcurve_index;
117 if (fcu->grp != group) {
123 group->fcurve_range_length = fcurve_index - group->fcurve_range_start;
136 action.
curves = {
nullptr,
nullptr};
137 action.
groups = {
nullptr,
nullptr};
142 animated_id.
runtime->readfile_data->tags.action_assignment_needs_slot =
true;
150 auto flag_adt = [](
ID &animated_id,
179 auto version_slot_assignment = [&](
ID &animated_id,
183 char *last_used_slot_identifier) {
185 Action &action = dna_action->wrap();
198 if (current_slot_ptr.
data) {
210 *
reinterpret_cast<short *
>(last_used_slot_identifier) =
GS(animated_id.
name);
218 animated_id, action, last_used_slot_identifier);
219 if (!slot_to_assign) {
225 "\"%s\" is using Action \"%s\", which does not have a slot with identifier "
226 "\"%s\" or \"%s\". Manually assign the right action slot to \"%s\".\n",
229 last_used_slot_identifier,
231 animated_id.
name + 2);
236 &action.
id, &RNA_ActionSlot, slot_to_assign);
238 &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 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
ID_RuntimeHandle * runtime
struct ActionChannelbag * channelbag