Blender V5.3
blender::animrig::versioning Namespace Reference

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)

Typedef Documentation

◆ IDFCurveCallback

Definition at line 303 of file versioning.cc.

Function Documentation

◆ action_groups_reconstruct()

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().

◆ action_is_layered()

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().

◆ adt_apply_all_fcurves_cb()

◆ convert_legacy_action_assignments()

◆ convert_legacy_animato_action()

void blender::animrig::versioning::convert_legacy_animato_action ( bAction & dna_action)

◆ 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().

◆ fcurves_for_legacy_action()

Vector< FCurve * > blender::animrig::versioning::fcurves_for_legacy_action ( bAction * action)

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().

◆ fcurves_id_cb()

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().

◆ fcurves_listbase_apply_cb()

bool blender::animrig::versioning::fcurves_listbase_apply_cb ( ID * id,
ListBaseT< FCurve > * fcurves,
const IDFCurveCallback func )
static

Iterates over FCurves until the callback returns false or all FCurves were visited.

Returns
true if 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().

◆ fcurves_main_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().

◆ nlastrips_apply_all_curves_cb()

bool blender::animrig::versioning::nlastrips_apply_all_curves_cb ( ID * id,
ListBaseT< NlaStrip > * strips,
const IDFCurveCallback func )
static

◆ tag_action_user_for_slotted_actions_conversion()

void blender::animrig::versioning::tag_action_user_for_slotted_actions_conversion ( ID & animated_id)

◆ tag_action_users_for_slotted_actions_conversion()