|
Blender V5.0
|
Namespaces | |
| namespace | tests |
Functions | |
| bool | action_is_layered (const bAction &dna_action) |
| void | convert_legacy_animato_actions (Main &bmain) |
| void | convert_legacy_animato_action (bAction &dna_action) |
| void | tag_action_users_for_slotted_actions_conversion (Main &bmain) |
| void | tag_action_user_for_slotted_actions_conversion (ID &animated_id) |
| void | convert_legacy_action_assignments (Main &bmain, ReportList *reports) |
| bool blender::animrig::versioning::action_is_layered | ( | const bAction & | dna_action | ) |
Return whether an action is layered (as opposed to legacy).
This will return false for both Animato and pre-Animato actions. It is used during file read and versioning to determine how forward-compatible and legacy data should be handled.
NOTE: this is semi-duplicated from Action::is_action_layered(), but with tweaks to also recognize ultra-legacy (pre-Animato) data. Because this needs access to deprecated DNA fields, which is ok here in the versioning code, the other "is this legacy or layered?" functions do not check for pre-Animato data.
Definition at line 38 of file versioning.cc.
References BLI_listbase_is_empty(), bAction::curves, bAction::groups, bAction::layer_array_num, and bAction::slot_array_num.
Referenced by blender::bke::action_blend_read_data(), convert_legacy_animato_actions(), and blender::animrig::versioning::tests::TEST().
| void blender::animrig::versioning::convert_legacy_action_assignments | ( | Main & | bmain, |
| ReportList * | reports ) |
Convert the Action assignments of all animated IDs.
For all IDs that use an Action, this also picks an Action Slot to ensure the ID is still animated.
This only visits IDs tagged by tag_action_users_for_slotted_actions_conversion.
Definition at line 177 of file versioning.cc.
References ID_Readfile_Data::Tags::action_assignment_needs_slot, BKE_reportf(), BLI_assert, BLI_strncpy_utf8(), BLO_readfile_id_runtime_tags(), PointerRNA::data, DATA_, blender::animrig::legacy::DEFAULT_LEGACY_SLOT_NAME, blender::animrig::foreach_action_slot_use_with_rna(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, blender::animrig::generic_slot_for_autoassign(), GS, bAction::id, bNodeTree::id, blender::animrig::Slot::identifier_length_max, ID::name, blender::bke::node_tree_from_id(), RNA_pointer_create_discrete(), RNA_property_pointer_get(), RNA_property_pointer_set(), RNA_property_update_main(), RPT_WARNING, and bAction::slot_array_num.
Referenced by do_versions_after_linking_440(), and do_versions_after_setup().
| void blender::animrig::versioning::convert_legacy_animato_action | ( | bAction & | dna_action | ) |
Convert legacy (Animato) Action to slotted Action, in-place.
This always creates a slot and a layer for the Action, even when the Action doesn't actually contain any animation data. This ensures that versioned Actions all look the same, and there's just less variations to keep track of.
Definition at line 75 of file versioning.cc.
References BLI_assert, BLI_listbase_count(), bActionGroup::channelbag, bAction::curves, blender::animrig::Strip::data(), DATA_, blender::animrig::legacy::DEFAULT_LEGACY_LAYER_NAME, blender::animrig::legacy::DEFAULT_LEGACY_SLOT_NAME, DNA_DEFAULT_ACTION_LAST_SLOT_HANDLE, ActionChannelbag::fcurve_array, ActionChannelbag::fcurve_array_num, ActionChannelbag::group_array, ActionChannelbag::group_array_num, bAction::groups, bAction::idroot, ActionSlot::idtype, blender::animrig::Slot::idtype_string(), blender::animrig::Action::is_action_legacy(), bAction::last_slot_handle, blender::animrig::Action::layer_add(), LISTBASE_FOREACH, LISTBASE_FOREACH_INDEX, MEM_calloc_arrayN(), blender::animrig::Action::slot_add(), blender::animrig::Action::slot_identifier_define(), and blender::animrig::Layer::strip_add().
Referenced by convert_legacy_animato_actions().
| void blender::animrig::versioning::convert_legacy_animato_actions | ( | Main & | bmain | ) |
Convert all legacy (Animato) Actions to slotted Actions, in-place.
This function does not work on pre-Animato actions.
Definition at line 57 of file versioning.cc.
References action_is_layered(), Main::actions, convert_legacy_animato_action(), blender::animrig::Action::is_empty(), and LISTBASE_FOREACH.
Referenced by do_versions_after_linking_440().
| void blender::animrig::versioning::tag_action_user_for_slotted_actions_conversion | ( | ID & | animated_id | ) |
Tag this ID so it'll get its legacy Action assignment converted.
Definition at line 140 of file versioning.cc.
References ID::runtime.
Referenced by tag_action_users_for_slotted_actions_conversion().
| void blender::animrig::versioning::tag_action_users_for_slotted_actions_conversion | ( | Main & | bmain | ) |
Go over all animated IDs, and tag them whenever they use a legacy Action.
Definition at line 145 of file versioning.cc.
References blender::animrig::foreach_action_slot_use_with_references(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, bNodeTree::id, blender::bke::node_tree_from_id(), and tag_action_user_for_slotted_actions_conversion().
Referenced by do_versions_after_linking_440().