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

Functions

Vector< const FCurve * > fcurves_all (const bAction *action)
Vector< FCurve * > fcurves_all (bAction *action)
bool assigned_action_has_keyframes (AnimData *adt)
Vector< bActionGroup * > channel_groups_all (bAction *action)
Vector< bActionGroup * > channel_groups_for_assigned_slot (AnimData *adt)
bool action_fcurves_remove (bAction &action, slot_handle_t slot_handle, StringRefNull rna_path_prefix)
template<typename ActionType, typename FCurveType, typename LayerType, typename StripType, typename StripKeyframeDataType, typename ChannelbagType>
static Vector< FCurveType * > fcurves_all_templated (ActionType &action)
template<typename ActionType, typename FCurveType, typename LayerType, typename StripType, typename StripKeyframeDataType, typename ChannelbagType>
static Vector< FCurveType * > fcurves_for_action_slot_templated (ActionType &action, const slot_handle_t slot_handle)

Variables

constexpr const char * DEFAULT_LEGACY_SLOT_NAME = "Legacy Slot"
constexpr const char * DEFAULT_LEGACY_LAYER_NAME = "Legacy Layer"

Function Documentation

◆ action_fcurves_remove()

bool blender::animrig::legacy::action_fcurves_remove ( bAction & action,
slot_handle_t slot_handle,
StringRefNull rna_path_prefix )

Remove all F-Curves whose RNA path starts with the given prefix from an Action Slot.

Parameters
rna_path_prefixAll F-Curves whose RNA path start with this string will get removed. Note that there is no other semantics here, so prefix = "rotation" will remove "rotation_euler" as well. The prefix may not be an empty string.
Returns
true if any were removed, false otherwise.

Definition at line 132 of file action_legacy.cc.

References action_fcurves_remove(), blender::BLI_assert(), blender::animrig::channelbag_for_action_slot(), blender::animrig::Channelbag::fcurve(), blender::ActionChannelbag::fcurve_array_num, blender::animrig::Channelbag::fcurve_remove_by_index(), and blender::blender::StringRefBase::is_empty().

Referenced by action_fcurves_remove(), blender::BKE_animdata_fix_paths_remove(), blender::nlastrips_path_remove_fix(), and blender::animrig::tests::TEST_F().

◆ assigned_action_has_keyframes()

bool blender::animrig::legacy::assigned_action_has_keyframes ( AnimData * adt)

Return whether the action (+slot), if any, assigned to adt has keyframes. This only considers the assigned slot.

A null adt or a lack of assigned action are both handled, and are considered to mean no key frames (and thus will return false).

Definition at line 83 of file action_legacy.cc.

References blender::AnimData::action, assigned_action_has_keyframes(), blender::animrig::Action::has_keyframes(), and blender::AnimData::slot_handle.

Referenced by blender::animviz_motionpath_compute_range(), and assigned_action_has_keyframes().

◆ channel_groups_all()

Vector< bActionGroup * > blender::animrig::legacy::channel_groups_all ( bAction * action)

Return all Channel Groups in the Action. This will return all channel groups for all slots/layers/strips.

See also
#animrig::legacy::channel_groups_for_assigned_slot

Definition at line 93 of file action_legacy.cc.

References channel_groups_all(), blender::animrig::StripKeyframeData::channelbags(), blender::data, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::animrig::Strip::Keyframe, layer, and blender::animrig::Action::layers().

Referenced by blender::action_flip_pchan_rna_paths(), and channel_groups_all().

◆ channel_groups_for_assigned_slot()

Vector< bActionGroup * > blender::animrig::legacy::channel_groups_for_assigned_slot ( AnimData * adt)

Return all Channel Groups for the assigned Action Slot.

See also
#animrig::legacy::channel_groups_all

Definition at line 116 of file action_legacy.cc.

References blender::AnimData::action, blender::animrig::Channelbag::channel_groups(), channel_groups_for_assigned_slot(), blender::animrig::channelbag_for_action_slot(), and blender::AnimData::slot_handle.

Referenced by channel_groups_for_assigned_slot().

◆ fcurves_all() [1/2]

Vector< FCurve * > blender::animrig::legacy::fcurves_all ( bAction * action)

Definition at line 47 of file action_legacy.cc.

References fcurves_all(), and fcurves_all_templated().

◆ fcurves_all() [2/2]

Vector< const FCurve * > blender::animrig::legacy::fcurves_all ( const bAction * action)

Return all F-Curves in the Action.

It will return all F-Curves for all slots/layers/strips.

The use of this function is an indicator for code that might have to be inspected to see if this is really the desired behavior, or whether the F-Curves for a specific slot/layer/strip should be used instead.

See also
#animrig::legacy::fcurves_for_action_slot

Definition at line 56 of file action_legacy.cc.

References fcurves_all(), and fcurves_all_templated().

Referenced by blender::animrig::action_deselect_keys(), blender::action_flip_pchan_rna_paths(), fcurves_all(), fcurves_all(), blender::animrig::Action::get_frame_range(), blender::animrig::Action::get_frame_range_of_keys(), blender::animrig::Action::has_single_frame(), and blender::animrig::tests::TEST_F().

◆ fcurves_all_templated()

template<typename ActionType, typename FCurveType, typename LayerType, typename StripType, typename StripKeyframeDataType, typename ChannelbagType>
Vector< FCurveType * > blender::animrig::legacy::fcurves_all_templated ( ActionType & action)
static

◆ fcurves_for_action_slot_templated()

template<typename ActionType, typename FCurveType, typename LayerType, typename StripType, typename StripKeyframeDataType, typename ChannelbagType>
Vector< FCurveType * > blender::animrig::legacy::fcurves_for_action_slot_templated ( ActionType & action,
const slot_handle_t slot_handle )
static

Variable Documentation

◆ DEFAULT_LEGACY_LAYER_NAME

const char* blender::animrig::legacy::DEFAULT_LEGACY_LAYER_NAME = "Legacy Layer"
constexpr

◆ DEFAULT_LEGACY_SLOT_NAME

const char* blender::animrig::legacy::DEFAULT_LEGACY_SLOT_NAME = "Legacy Slot"
constexpr