|
Blender V5.3
|
Namespaces | |
| namespace | tests |
Typedefs | |
| using | IDFCurveCallback = FunctionRef<bool(ID *, FCurve *)> |
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) |
| void | action_groups_reconstruct (bAction *act) |
| void | fcurves_id_cb (ID *id, const FunctionRef< void(ID *, FCurve *)> func) |
| void | fcurves_main_cb (Main *bmain, const FunctionRef< void(ID *, FCurve *)> func) |
| Vector< FCurve * > | fcurves_for_legacy_action (bAction *action) |
| static bool | fcurves_listbase_apply_cb (ID *id, ListBaseT< FCurve > *fcurves, const IDFCurveCallback func) |
| static bool | nlastrips_apply_all_curves_cb (ID *id, ListBaseT< NlaStrip > *strips, const IDFCurveCallback func) |
| static bool | adt_apply_all_fcurves_cb (ID *id, AnimData *adt, const IDFCurveCallback func) |
| using blender::animrig::versioning::IDFCurveCallback = FunctionRef<bool(ID *, FCurve *)> |
Definition at line 303 of file versioning.cc.
| void blender::animrig::versioning::action_groups_reconstruct | ( | bAction * | act | ) |
Reconstruct channel pointers. Assumes that the groups referred to by the FCurves are already in act->groups. Reorders the main channel list to match group order.
Only used in versioning code since this only works with legacy actions which no longer exist in new files.
Definition at line 269 of file versioning.cc.
References action_groups_reconstruct(), blender::BLI_addtail(), blender::BLI_assert(), blender::BLI_findindex(), blender::BLI_movelisttolist(), blender::bActionGroup::channels, blender::bAction::curves, blender::bAction::groups, blender::bAction::layer_array_num, and blender::bAction::slot_array_num.
Referenced by action_groups_reconstruct(), and blender::blo_do_versions_300().
| 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.
Definition at line 38 of file versioning.cc.
References action_is_layered(), blender::bAction::curves, blender::bAction::groups, blender::bAction::layer_array_num, and blender::bAction::slot_array_num.
Referenced by blender::bke::action_blend_read_data(), action_is_layered(), convert_legacy_animato_actions(), blender::rename_paths_action(), and blender::animrig::versioning::tests::TEST_F().
|
static |
Definition at line 340 of file versioning.cc.
References blender::AnimData::action, adt_apply_all_fcurves_cb(), blender::bAction::curves, blender::AnimData::drivers, fcurves_listbase_apply_cb(), blender::AnimData::nla_tracks, nlastrips_apply_all_curves_cb(), blender::NlaTrack::strips, and blender::AnimData::tmpact.
Referenced by adt_apply_all_fcurves_cb(), fcurves_id_cb(), and fcurves_main_cb().
| 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 blender::ID_Readfile_Data::Tags::action_assignment_needs_slot, blender::BKE_reportf(), blender::BLI_assert(), blender::BLI_strncpy_utf8(), blender::BLO_readfile_id_runtime_tags(), convert_legacy_action_assignments(), 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(), blender::GS(), blender::bAction::id, blender::bNodeTree::id, blender::animrig::Slot::identifier_length_max, blender::ID::name, blender::bke::node_tree_from_id(), blender::RNA_pointer_create_discrete(), blender::RNA_property_pointer_get(), blender::RNA_property_pointer_set(), blender::RNA_property_update_main(), blender::RPT_WARNING, and blender::bAction::slot_array_num.
Referenced by convert_legacy_action_assignments(), blender::do_versions_after_linking_404(), and blender::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 74 of file versioning.cc.
References blender::BLI_assert(), blender::bActionGroup::channelbag, convert_legacy_animato_action(), blender::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, blender::ActionChannelbag::fcurve_array, blender::ActionChannelbag::fcurve_array_num, blender::ActionChannelbag::group_array, blender::ActionChannelbag::group_array_num, blender::bAction::groups, blender::FCurve::grp, blender::bAction::idroot, blender::ActionSlot::idtype, blender::animrig::Slot::idtype_string(), blender::animrig::Strip::Keyframe, blender::bAction::last_slot_handle, layer, blender::animrig::Action::layer_add(), blender::bAction::layer_array_num, blender::MEM_new_array_zeroed(), blender::animrig::Action::slot_add(), blender::bAction::slot_array_num, and blender::animrig::Action::slot_identifier_define().
Referenced by convert_legacy_animato_action(), and 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 56 of file versioning.cc.
References action_is_layered(), blender::Main::actions, convert_legacy_animato_action(), convert_legacy_animato_actions(), and blender::animrig::Action::is_empty().
Referenced by convert_legacy_animato_actions(), and blender::do_versions_after_linking_404().
Return all FCurves of the given legacy action. This will return an empty Vector for layered actions.
Definition at line 394 of file versioning.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bAction::curves, and fcurves_for_legacy_action().
Referenced by fcurves_for_legacy_action(), and blender::rename_paths_action().
| void blender::animrig::versioning::fcurves_id_cb | ( | ID * | id, |
| const FunctionRef< void(ID *, FCurve *)> | func ) |
This should only be used on legacy actions (i.e. not layered) in versioning code from before 4.4.0. Anything after that should use BKE_fcurves_id_cb.
Definition at line 368 of file versioning.cc.
References adt_apply_all_fcurves_cb(), blender::BKE_animdata_from_id(), and fcurves_id_cb().
Referenced by fcurves_id_cb(), and blender::update_mapping_node_inputs_and_properties().
|
static |
Iterates over FCurves until the callback returns false or all FCurves were visited.
Definition at line 310 of file versioning.cc.
References fcurves_listbase_apply_cb().
Referenced by adt_apply_all_fcurves_cb(), fcurves_listbase_apply_cb(), and nlastrips_apply_all_curves_cb().
| void blender::animrig::versioning::fcurves_main_cb | ( | Main * | bmain, |
| const FunctionRef< void(ID *, FCurve *)> | func ) |
This should only be used on legacy actions (i.e. not layered) in versioning code from before 4.4.0. Anything after that should use BKE_fcurves_main_cb.
Definition at line 381 of file versioning.cc.
References adt_apply_all_fcurves_cb(), blender::BKE_animdata_main_cb(), and fcurves_main_cb().
Referenced by blender::do_versions_after_linking_270(), and fcurves_main_cb().
|
static |
Definition at line 323 of file versioning.cc.
References fcurves_listbase_apply_cb(), and nlastrips_apply_all_curves_cb().
Referenced by adt_apply_all_fcurves_cb(), and nlastrips_apply_all_curves_cb().
| 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 blender::ID_Readfile_Data::Tags::action_assignment_needs_slot, blender::bke::id::ID_Runtime::readfile_data, blender::ID::runtime, tag_action_user_for_slotted_actions_conversion(), and blender::ID_Readfile_Data::tags.
Referenced by tag_action_user_for_slotted_actions_conversion(), and 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, blender::bNodeTree::id, blender::bke::node_tree_from_id(), tag_action_user_for_slotted_actions_conversion(), and tag_action_users_for_slotted_actions_conversion().
Referenced by blender::do_versions_after_linking_404(), and tag_action_users_for_slotted_actions_conversion().