|
Blender V5.0
|
Functions | |
| Slot & | slot_ensure (Action &action) |
| Channelbag * | channelbag_get (Action &action) |
| Channelbag & | channelbag_ensure (Action &action) |
| Vector< const FCurve * > | fcurves_all (const bAction *action) |
| Vector< FCurve * > | fcurves_all (bAction *action) |
| Vector< FCurve * > | fcurves_first_slot (bAction *action) |
| Vector< FCurve * > | fcurves_for_action_slot (bAction *action, slot_handle_t slot_handle) |
| Vector< const FCurve * > | fcurves_for_action_slot (const bAction *action, slot_handle_t slot_handle) |
| Vector< FCurve * > | fcurves_for_assigned_action (AnimData *adt) |
| Vector< const FCurve * > | fcurves_for_assigned_action (const AnimData *adt) |
| 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_treat_as_legacy (const bAction &action) |
| bool | action_fcurves_remove (bAction &action, slot_handle_t slot_handle, StringRefNull rna_path_prefix) |
| static Strip * | first_keyframe_strip (Action &action) |
| 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" |
| 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.
This function works for both legacy and layered Actions. For the former, the slot handle is ignored.
| rna_path_prefix | All 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. |
Definition at line 301 of file action_legacy.cc.
References BKE_fcurve_free(), BLI_assert, BLI_remlink(), blender::StringRefNull::c_str(), blender::animrig::channelbag_for_action_slot(), bAction::curves, blender::animrig::Channelbag::fcurve(), ActionChannelbag::fcurve_array_num, blender::animrig::Channelbag::fcurve_remove_by_index(), blender::animrig::Action::is_action_legacy(), blender::StringRefBase::is_empty(), LISTBASE_FOREACH_MUTABLE, FCurve::rna_path, and STRPREFIX.
Referenced by BKE_animdata_fix_paths_remove(), nlastrips_path_remove_fix(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::legacy::action_treat_as_legacy | ( | const bAction & | action | ) |
Determine whether to treat this Action as a legacy Action or not.
Definition at line 291 of file action_legacy.cc.
Referenced by blender::animrig::action_fcurve_attach(), blender::animrig::action_fcurve_ensure_ex(), action_idcode_patch_check(), blender::animrig::action_slot_get_id_for_keying(), animchannels_group_channels(), animchannels_ungroup_exec(), BKE_animdata_action_ensure_idroot(), blender::animrig::generic_assign_action(), blender::animrig::insert_keyframes(), blender::animrig::is_action_assignable_to(), nla_panel_actclip(), nlaedit_add_actionclip_exec(), blender::ed::outliner::outliner_action_set_exec(), rearrange_action_channels(), blender::ed::vse::sequencer_paste_animation(), blender::ed::vse::sequencer_write_copy_paste_file(), and blender::ed::object::test_constraint().
| bool blender::animrig::legacy::assigned_action_has_keyframes | ( | AnimData * | adt | ) |
Return whether the action (+slot), if any, assigned to adt has keyframes.
This works for both layered and legacy actions. For layered actions 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 219 of file action_legacy.cc.
References AnimData::action, bAction::curves, ListBase::first, blender::animrig::Action::has_keyframes(), blender::animrig::Action::is_action_legacy(), and AnimData::slot_handle.
Referenced by animviz_motionpath_compute_range().
| Vector< bActionGroup * > blender::animrig::legacy::channel_groups_all | ( | bAction * | action | ) |
Return all Channel Groups in the Action.
This works for both legacy and layered Actions. For the latter, it will return all channel groups for all slots/layers/strips.
Definition at line 234 of file action_legacy.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::animrig::StripKeyframeData::channelbags(), data, blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), bAction::groups, blender::animrig::Action::is_action_legacy(), blender::animrig::Action::layers(), and LISTBASE_FOREACH.
Referenced by action_flip_pchan_rna_paths(), action_groups_clear_tempflags(), channel_groups_for_assigned_slot(), get_active_actiongroup(), and set_active_action_group().
| Vector< bActionGroup * > blender::animrig::legacy::channel_groups_for_assigned_slot | ( | AnimData * | adt | ) |
Return all Channel Groups for the assigned Action Slot.
This works for both legacy and layered Actions. For the former, this function acts identical to channel_groups_all().
Definition at line 268 of file action_legacy.cc.
References AnimData::action, blender::animrig::Channelbag::channel_groups(), channel_groups_all(), blender::animrig::channelbag_for_action_slot(), blender::animrig::Action::is_action_legacy(), and AnimData::slot_handle.
| Channelbag & blender::animrig::legacy::channelbag_ensure | ( | Action & | action | ) |
Ensure a Channelbag exists, for compatibility with the legacy Python API.
This basically is channelbag_get(action), additionally creating the necessary slot, layer, and keyframe strip if necessary.
Definition at line 56 of file action_legacy.cc.
References blender::animrig::assert_baklava_phase_1_invariants(), blender::animrig::Strip::data(), DATA_, DEFAULT_LEGACY_LAYER_NAME, blender::animrig::Action::layer(), blender::animrig::Action::layer_add(), blender::animrig::Action::layers(), slot_ensure(), blender::animrig::Layer::strip(), blender::animrig::Layer::strip_add(), and blender::animrig::Layer::strips().
| Channelbag * blender::animrig::legacy::channelbag_get | ( | Action & | action | ) |
Return the Channelbag for compatibility with the legacy Python API.
Definition at line 42 of file action_legacy.cc.
References blender::animrig::Strip::data(), first_keyframe_strip(), blender::animrig::Action::slot(), and blender::animrig::Action::slots().
Definition at line 118 of file action_legacy.cc.
References fcurves_all_templated().
Return all F-Curves in the Action.
This works for both legacy and layered Actions. For the latter, 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.
Definition at line 127 of file action_legacy.cc.
References fcurves_all_templated().
Referenced by blender::animrig::action_deselect_keys(), action_flip_pchan_rna_paths(), animsys_evaluate_action(), fcurves_first_slot(), blender::animrig::Action::get_frame_range(), blender::animrig::Action::get_frame_range_of_keys(), blender::animrig::Action::get_frame_range_of_slot(), blender::animrig::Action::has_single_frame(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
static |
Definition at line 86 of file action_legacy.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, data, and LISTBASE_FOREACH.
Referenced by fcurves_all(), and fcurves_all().
Return the F-Curves for the first slot of this Action.
This works for both legacy and layered Actions. For the former, it will return all F-Curves in the Action.
Definition at line 140 of file action_legacy.cc.
References fcurves_all(), fcurves_for_action_slot(), ActionSlot::handle, blender::animrig::Action::is_action_legacy(), blender::animrig::Action::slot(), and blender::animrig::Action::slots().
| Vector< FCurve * > blender::animrig::legacy::fcurves_for_action_slot | ( | bAction * | action, |
| slot_handle_t | slot_handle ) |
Return the F-Curves for this specific slot handle.
On a legacy Action, this returns all F-Curves, and ignores the slot handle.
The use of this function is an indicator for code that can be simplified when the slotted Actions feature is no longer experimental. When that switchover happens, calls to this function can be replaced with the more efficient blender::animrig::fcurves_for_action_slot().
Definition at line 177 of file action_legacy.cc.
References fcurves_for_action_slot_templated().
Referenced by adt_apply_all_fcurves_cb(), animsys_blend_in_action(), blender::bke::BKE_action_find_fcurves_with_bones(), BKE_action_fix_paths_rename(), BKE_animdata_fix_paths_rename(), fcurves_first_slot(), fcurves_for_assigned_action(), fcurves_for_assigned_action(), nla_eval_domain_action(), nlasnapshot_from_action(), nlastrips_apply_all_curves_cb(), nlastrips_path_rename_fix(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| Vector< const FCurve * > blender::animrig::legacy::fcurves_for_action_slot | ( | const bAction * | action, |
| slot_handle_t | slot_handle ) |
Definition at line 189 of file action_legacy.cc.
References fcurves_for_action_slot_templated().
|
static |
Definition at line 164 of file action_legacy.cc.
References blender::animrig::fcurves_for_action_slot(), and blender::listbase_to_vector().
Referenced by fcurves_for_action_slot(), and fcurves_for_action_slot().
Return the F-Curves for the assigned Action Slot.
For legacy Actions, this ignores the slot and just returns all F-Curves of the assigned Action.
If adt is nullptr or there is no Action assigned (i.e. adt->action == nullptr), an empty Vector is returned.
Definition at line 203 of file action_legacy.cc.
References AnimData::action, fcurves_for_action_slot(), and AnimData::slot_handle.
Referenced by animviz_motionpath_compute_range(), blender::animrig::assigned_action_has_keyframe_at(), ED_curve_updateAnimPaths(), gather_frames_to_render_for_adt(), blender::ed::greasepencil::get_selected_object_keyframes(), blender::ed::vse::has_playback_animation(), modifiers_has_animation_check(), and blender::ed::vse::sequencer_paste_animation().
| Vector< const FCurve * > blender::animrig::legacy::fcurves_for_assigned_action | ( | const AnimData * | adt | ) |
Definition at line 210 of file action_legacy.cc.
References AnimData::action, fcurves_for_action_slot(), and AnimData::slot_handle.
Definition at line 16 of file action_legacy.cc.
References blender::animrig::Action::layers().
Referenced by channelbag_get().
Ensure that a Slot exists, for legacy Python API shims that need one.
Definition at line 29 of file action_legacy.cc.
References blender::animrig::assert_baklava_phase_1_invariants(), DATA_, DEFAULT_LEGACY_SLOT_NAME, blender::animrig::Action::slot(), blender::animrig::Action::slot_add(), blender::animrig::Action::slot_display_name_define(), and blender::animrig::Action::slots().
Referenced by channelbag_ensure().
|
constexpr |
Definition at line 22 of file ANIM_action_legacy.hh.
Referenced by channelbag_ensure(), and blender::animrig::versioning::convert_legacy_animato_action().
|
constexpr |
Definition at line 21 of file ANIM_action_legacy.hh.
Referenced by blender::animrig::versioning::convert_legacy_action_assignments(), blender::animrig::versioning::convert_legacy_animato_action(), and slot_ensure().