|
Blender V4.3
|
#include <ANIM_action.hh>
Inherits bAction.
Protected Member Functions | |
| int64_t | find_layer_index (const Layer &layer) const |
| int64_t | find_slot_index (const Slot &slot) const |
| int | strip_keyframe_data_append (StripKeyframeData *strip_data) |
| void | strip_keyframe_data_remove_if_unused (int index) |
Protected Attributes | |
| friend | Strip |
| friend | Layer |
Additional Inherited Members | |
Public Attributes inherited from bAction | |
| ID | id |
| struct ActionLayer ** | layer_array |
| int | layer_array_num |
| int | layer_active_index |
| struct ActionSlot ** | slot_array |
| int | slot_array_num |
| int32_t | last_slot_handle |
| struct ActionStripKeyframeData ** | strip_keyframe_data_array |
| int | strip_keyframe_data_array_num |
| char | _pad0 [4] |
| ListBase | curves |
| ListBase chanbase | DNA_DEPRECATED |
| ListBase | groups |
| ListBase | markers |
| int | flag |
| int | active_marker |
| int | idroot |
| char | _pad1 [4] |
| float | frame_start |
| float | frame_end |
| PreviewImage * | preview |
Container of animation data for one or more animated IDs.
Broadly an Action consists of Layers, each Layer has Strips, and it's the Strips that eventually contain the animation data.
Temporary limitation: each Action can only contain one Layer.
Which sub-set of that data drives the animation of which ID is determined by which Slot is associated with that ID.
bAction DNA struct only has functionality for the layered animation data. The legacy F-Curves (in bAction::curves) and their groups (in bAction::groups) are not managed here. To see whether an Action uses this legacy data, or has been converted to the current layered structure, use Action::is_action_legacy() and Action::is_action_layered(). Note that an empty Action is considered valid for both.Definition at line 68 of file ANIM_action.hh.
|
default |
|
delete |
Copy constructor is deleted, as code should use regular ID library management functions to duplicate this data-block.
Return the layer's index, or -1 if not found in this Action.
Definition at line 316 of file animrig/intern/action.cc.
References layer(), and layers().
Referenced by layer_remove().
Return the slot's index, or -1 if not found in this Action.
Definition at line 327 of file animrig/intern/action.cc.
References slot(), and slots().
Referenced by slot_remove().
Find the slot that best matches the animated ID.
If the ID is already animated by this Action, by matching this Action's slots with (in order):
animated_id.adt->slot_handle,animated_id.adt->slot_name,animated_id.name.Note that this is different from #slot_for_id, which does not use the slot name, and only works when this Action is already assigned.
Definition at line 559 of file animrig/intern/action.cc.
References AnimData::action, BKE_animdata_from_id(), blender::animrig::Slot::is_suitable_for(), ID::name, slot(), slot_find_by_name(), slot_for_handle(), AnimData::slot_handle, and AnimData::slot_name.
| float2 blender::animrig::Action::get_frame_range | ( | ) | const |
Retrieve the intended playback frame range of the entire Action.
Definition at line 758 of file animrig/intern/action.cc.
References ACT_FRAME_RANGE, blender::animrig::legacy::fcurves_all(), bAction::flag, bAction::frame_end, bAction::frame_start, and blender::animrig::get_frame_range_of_fcurves().
Referenced by BKE_nlastrip_new(), and draw_nla_main_data().
| float2 blender::animrig::Action::get_frame_range_of_keys | ( | bool | include_modifiers | ) | const |
Calculate the extents of this Action.
Performs a scan of all F-Curves for their first & last key frames.
Definition at line 788 of file animrig/intern/action.cc.
References blender::animrig::legacy::fcurves_all(), and blender::animrig::get_frame_range_of_fcurves().
Referenced by blender::animrig::tests::TEST_F().
| float2 blender::animrig::Action::get_frame_range_of_slot | ( | slot_handle_t | slot_handle | ) | const |
Retrieve the intended playback frame range of a slot.
Definition at line 768 of file animrig/intern/action.cc.
References ACT_FRAME_RANGE, blender::animrig::legacy::fcurves_all(), blender::animrig::fcurves_for_action_slot(), bAction::flag, bAction::frame_end, bAction::frame_start, blender::animrig::get_frame_range_of_fcurves(), and is_action_layered().
| Layer * blender::animrig::Action::get_layer_for_keyframing | ( | ) |
Get the layer that should be used for user-level keyframe insertion.
Definition at line 664 of file animrig/intern/action.cc.
References blender::animrig::assert_baklava_phase_1_invariants(), is_empty(), layer(), and layers().
Referenced by blender::animrig::insert_key_layered_action().
| bool blender::animrig::Action::has_keyframes | ( | slot_handle_t | action_slot_handle | ) | const |
Check if the slot with this handle has any keyframes.
Definition at line 692 of file animrig/intern/action.cc.
References blender::animrig::fcurves_for_action_slot(), is_action_legacy(), and LISTBASE_FOREACH.
Referenced by action_pushdown_exec(), blender::animrig::legacy::assigned_action_has_keyframes(), and BKE_nla_action_pushdown().
| bool blender::animrig::Action::has_single_frame | ( | ) | const |
Return whether the action has one unique point in time keyed.
This is mostly for the pose library, which will have different behavior depending on whether an Action corresponds to a "pose" (one keyframe) or "animation snippet" (multiple keyframes).
false when there is no keyframe at all or keys on different points in time, true when exactly one point in time is keyed. Definition at line 712 of file animrig/intern/action.cc.
References compare_ff(), and blender::animrig::legacy::fcurves_all().
| bool blender::animrig::Action::is_action_layered | ( | ) | const |
Return whether this is a layered Action.
bAction::layer_array.Definition at line 222 of file animrig/intern/action.cc.
References BLI_listbase_is_empty(), bAction::layer_array_num, and bAction::slot_array_num.
Referenced by blender::bke::action_blend_read_data(), blender::bke::action_blend_write(), blender::animrig::action_fcurve_remove(), animchannels_delete_exec(), BKE_animdata_id_is_animated(), BKE_animsys_evaluate_animdata(), BKE_nla_tweakmode_enter(), BKE_nla_tweakmode_exit(), blender::deg::DepsgraphRelationBuilder::build_action(), clear_anim_v3d_exec(), blender::animrig::clear_keyframe(), convert_action_in_place(), delete_key_v3d_without_keying_set(), blender::animrig::delete_keyframe(), blender::animrig::fcurve_find_by_rna_path(), blender::animrig::fcurves_for_action_slot(), blender::animrig::fcurves_for_action_slot(), blender::animrig::find_related_action(), blender::animrig::foreach_fcurve_in_action_slot(), get_frame_range_of_slot(), blender::animrig::insert_key_layered_action(), key_data_from_adt(), slot_new_for_object_poll(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), version_legacy_actions_to_layered(), and what_does_obaction().
| bool blender::animrig::Action::is_action_legacy | ( | ) | const |
Return whether this is a legacy Action.
bAction::curves.is_action_layered(). Definition at line 217 of file animrig/intern/action.cc.
References bAction::layer_array_num, and bAction::slot_array_num.
Referenced by achannel_is_part_of_disconnected_slot(), blender::animrig::action_fcurve_detach(), blender::animrig::legacy::action_fcurves_remove(), action_to_keylist(), blender::animrig::legacy::action_treat_as_legacy(), blender::animrig::animdata_fcurve_delete(), animfilter_act_group(), animfilter_action(), animsys_blend_in_action(), animsys_evaluate_action(), blender::animrig::assert_baklava_phase_1_invariants(), blender::animrig::legacy::assigned_action_has_keyframes(), BKE_animdata_id_is_animated(), blender::deg::DepsgraphRelationBuilder::build_animdata_action_targets(), blender::animrig::legacy::channel_groups_all(), blender::animrig::legacy::channel_groups_for_assigned_slot(), blender::animrig::convert_to_layered_action(), ED_curve_updateAnimPaths(), blender::animrig::fcurve_find_in_action(), blender::animrig::fcurve_find_in_action_slot(), blender::animrig::foreach_fcurve_in_action(), blender::animrig::foreach_fcurve_in_action_slot(), has_keyframes(), merge_actions_selection_exec(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and updateDuplicateActionConstraintSettings().
| bool blender::animrig::Action::is_cyclic | ( | ) | const |
Returns whether this Action is configured as cyclic.
Definition at line 750 of file animrig/intern/action.cc.
References ACT_CYCLIC, ACT_FRAME_RANGE, and bAction::flag.
Referenced by BKE_nlastrip_new().
| bool blender::animrig::Action::is_empty | ( | ) | const |
Return whether this Action has any data at all.
bAction::layer_array and bAction::slot_array, as well as the legacy curves list, are empty. Definition at line 208 of file animrig/intern/action.cc.
References BLI_listbase_is_empty(), bAction::layer_array_num, and bAction::slot_array_num.
Referenced by blender::bke::action_free_data(), blender::animrig::legacy::action_treat_as_legacy(), animfilter_action(), blender::deg::DepsgraphRelationBuilder::build_action(), blender::deg::DepsgraphRelationBuilder::build_animdata_action_targets(), get_layer_for_keyframing(), and layer_keystrip_ensure().
| bool blender::animrig::Action::is_slot_animated | ( | slot_handle_t | slot_handle | ) | const |
Return whether this Action actually has any animation data for the given slot.
Definition at line 589 of file animrig/intern/action.cc.
References blender::animrig::fcurves_for_action_slot(), blender::Span< T >::is_empty(), and blender::animrig::Slot::unassigned.
Referenced by BKE_animdata_id_is_animated().
Definition at line 244 of file animrig/intern/action.cc.
References bAction::layer_array.
Definition at line 240 of file animrig/intern/action.cc.
References bAction::layer_array.
Referenced by blender::bke::action_copy_data(), blender::animrig::action_fcurve_attach(), blender::animrig::action_fcurve_ensure(), blender::animrig::tests::add_fcurve_to_action(), blender::animrig::assert_baklava_phase_1_invariants(), blender::animrig::legacy::channelbag_ensure(), blender::animrig::fcurve_find_by_rna_path(), blender::animrig::fcurve_find_in_action(), find_layer_index(), get_layer_for_keyframing(), layer_keystrip_ensure(), blender::animrig::move_slot(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| Layer & blender::animrig::Action::layer_add | ( | std::optional< StringRefNull > | name | ) |
Definition at line 249 of file animrig/intern/action.cc.
References blender::animrig::ActionLayer_alloc(), blender::animrig::grow_array_and_append(), bAction::idroot, bAction::layer_active_index, bAction::layer_array, bAction::layer_array_num, ActionLayer::name, and STRNCPY_UTF8.
Referenced by convert_action_in_place(), blender::animrig::convert_to_layered_action(), layer_keystrip_ensure(), blender::animrig::tests::AnimationEvaluationTest::SetUp(), and blender::animrig::tests::TEST_F().
| void blender::animrig::Action::layer_keystrip_ensure | ( | ) |
Ensure that there is at least one layer with the infinite keyframe strip.
Definition at line 294 of file animrig/intern/action.cc.
References blender::animrig::assert_baklava_phase_1_invariants(), DATA_, is_empty(), layer(), layer_add(), layers(), and blender::animrig::Layer::strips().
Referenced by blender::animrig::action_fcurve_attach(), blender::animrig::action_fcurve_ensure(), blender::animrig::tests::add_fcurve_to_action(), blender::animrig::legacy::channelbag_ensure(), and blender::animrig::insert_key_layered_action().
| bool blender::animrig::Action::layer_remove | ( | Layer & | layer_to_remove | ) |
Remove the layer from this Action.
After this call, the passed reference is no longer valid, as the memory will have been freed. Any strips on the layer will be freed too.
Definition at line 279 of file animrig/intern/action.cc.
References find_layer_index(), bAction::layer_active_index, bAction::layer_array, bAction::layer_array_num, blender::animrig::layer_ptr_destructor(), and blender::dna::array::remove_index().
| blender::Span< Layer * > blender::animrig::Action::layers | ( | ) |
Definition at line 235 of file animrig/intern/action.cc.
References bAction::layer_array, and bAction::layer_array_num.
| blender::Span< const Layer * > blender::animrig::Action::layers | ( | ) | const |
Definition at line 230 of file animrig/intern/action.cc.
References bAction::layer_array, and bAction::layer_array_num.
Referenced by blender::bke::action_blend_write(), blender::bke::action_copy_data(), blender::animrig::action_fcurve_detach(), blender::animrig::action_fcurve_remove(), blender::bke::action_free_data(), blender::animrig::assert_baklava_phase_1_invariants(), blender::deg::DepsgraphRelationBuilder::build_animdata_action_targets(), blender::animrig::legacy::channel_groups_all(), blender::animrig::channelbag_for_action_slot(), blender::animrig::evaluate_action(), find_layer_index(), blender::animrig::legacy::first_keyframe_strip(), blender::animrig::foreach_fcurve_in_action(), blender::animrig::foreach_fcurve_in_action_slot(), get_layer_for_keyframing(), layer_keystrip_ensure(), slot_remove(), strip_keyframe_data_remove_if_unused(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
Definition at line 350 of file animrig/intern/action.cc.
References bAction::slot_array.
Definition at line 346 of file animrig/intern/action.cc.
References bAction::slot_array.
Referenced by blender::bke::action_blend_write(), blender::bke::action_copy_data(), blender::animrig::tests::add_fcurve_to_action(), blender::animrig::legacy::channelbag_ensure(), blender::animrig::legacy::channelbag_get(), convert_action_exec(), find_slot_index(), find_suitable_slot_for(), slot_active_get(), slot_active_set(), slot_add(), slot_add_for_id(), slot_find_by_name(), slot_for_handle(), slot_for_handle(), slot_name_define(), slot_name_propagate(), slot_name_set(), slot_setup_for_id(), blender::animrig::tests::TEST_F(), and version_legacy_actions_to_layered().
| Slot * blender::animrig::Action::slot_active_get | ( | ) |
Get the active Slot.
This requires a linear scan of the slots, to find the one with the 'Active' flag set. Storing this on the Slot itself has the advantage that the 'active' status of a Slot can be determined without requiring access to the owning Action.
As this already does a linear scan for the active slot, the slot is returned as a pointer; obtaining the pointer from a handle would require another linear scan to get the pointer, whereas obtaining the handle from the pointer is a constant operation.
Definition at line 549 of file animrig/intern/action.cc.
References blender::animrig::Slot::is_active(), slot(), and slots().
| void blender::animrig::Action::slot_active_set | ( | slot_handle_t | slot_handle | ) |
Set the active Slot, ensuring only one Slot is flagged as the Active one.
| slot_handle | if Slot::unassigned, there will not be any active slot. Passing an unknown/invalid slot handle will result in no slot being active. |
Definition at line 542 of file animrig/intern/action.cc.
References ActionSlot::handle, blender::animrig::Slot::set_active(), slot(), and slots().
Referenced by click_select_channel_action_slot(), and mouse_action_keys().
| Slot & blender::animrig::Action::slot_add | ( | ) |
Create a new, unused Slot.
The returned slot will be suitable for any ID type. After slot to an ID, it be limited to that ID's type.
Definition at line 477 of file animrig/intern/action.cc.
References ARRAY_SIZE, BLI_strncpy_utf8(), DATA_, blender::animrig::grow_array_and_append(), bAction::idroot, ActionSlot::name, slot(), bAction::slot_array, bAction::slot_array_num, blender::animrig::slot_name_ensure_unique(), and STRNCPY_UTF8.
Referenced by blender::animrig::tests::add_fcurve_to_action(), blender::animrig::legacy::channelbag_ensure(), convert_action_in_place(), blender::animrig::convert_to_layered_action(), blender::animrig::move_slot(), blender::animrig::tests::AnimationEvaluationTest::SetUp(), slot_add_for_id(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
Create a new slot, named after the given ID, and limited to the ID's type.
Note that this assigns neither this Action nor the new Slot to the ID. This function merely initializes the Slot itself to suitable values to start animating this ID.
Definition at line 501 of file animrig/intern/action.cc.
References GS, ActionSlot::idtype, ID::name, slot(), slot_add(), and slot_name_define().
Referenced by blender::animrig::assign_action_ensure_slot_for_keying(), BKE_animdata_transfer_by_basepath(), blender::bke::greasepencil::convert::AnimDataConvertor::fcurves_convert_finalize(), and slot_new_for_object_exec().
| Slot * blender::animrig::Action::slot_find_by_name | ( | StringRefNull | slot_name | ) |
Definition at line 453 of file animrig/intern/action.cc.
References blender::StringRefNull::c_str(), ActionSlot::name, slot(), slots(), and STREQ.
Referenced by blender::animrig::nla::assign_action(), blender::animrig::assign_action_ensure_slot_for_keying(), and find_suitable_slot_for().
| Slot * blender::animrig::Action::slot_for_handle | ( | slot_handle_t | handle | ) |
Return the Slot with the given handle.
| handle | can be Slot::unassigned, in which case nullptr is returned. |
nullptr when the slot cannot be found, so either the handle was Slot::unassigned or some value that does not match any Slot in this Action. Definition at line 355 of file animrig/intern/action.cc.
References slot(), and slot_for_handle().
Referenced by acf_fcurve_name(), achannel_is_part_of_disconnected_slot(), blender::animrig::action_fcurve_attach(), blender::animrig::action_slot_get_id_for_keying(), ANIM_animchannel_keyframes_loop(), animfilter_action(), blender::animrig::assign_action_ensure_slot_for_keying(), blender::animrig::nla::assign_action_slot_handle(), BKE_nla_tweakmode_enter(), BKE_nla_tweakmode_exit(), blender::deg::DepsgraphRelationBuilder::build_animdata_action_targets(), blender::animrig::delete_keyframe(), blender::animrig::fcurve_find_by_rna_path(), find_suitable_slot_for(), blender::animrig::generic_assign_action_slot(), blender::animrig::get_action_slot_pair(), merge_actions_selection_exec(), blender::animrig::internal::rebuild_slot_user_cache(), slot_for_handle(), blender::ed::object::test_constraint(), and blender::animrig::tests::TEST_F().
| const Slot * blender::animrig::Action::slot_for_handle | ( | slot_handle_t | handle | ) | const |
Definition at line 361 of file animrig/intern/action.cc.
References ActionSlot::handle, slot(), slots(), and blender::animrig::Slot::unassigned.
| void blender::animrig::Action::slot_name_define | ( | Slot & | slot, |
| StringRefNull | new_name ) |
Set the slot name, and ensure it is unique.
Definition at line 414 of file animrig/intern/action.cc.
References BLI_assert_msg, blender::StringRefNull::c_str(), ActionSlot::name, blender::animrig::Slot::name_length_min, size(), slot(), blender::animrig::slot_name_ensure_unique(), and STRNCPY_UTF8.
Referenced by slot_add_for_id(), and slot_name_set().
Update the AnimData::action_slot_name field of any ID that is animated by this Slot.
Should be called after slot_name_define(slot). This is implemented as a separate function due to the need to access bmain, which is available in the RNA on-property-update handler, but not in the RNA property setter.
Definition at line 422 of file animrig/intern/action.cc.
References AnimData::action, BKE_animdata_from_id(), FOREACH_MAIN_LISTBASE_BEGIN, FOREACH_MAIN_LISTBASE_END, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, ActionSlot::handle, bAction::id, id_can_have_animdata(), ActionSlot::name, slot(), AnimData::slot_handle, AnimData::slot_name, and STRNCPY_UTF8.
Referenced by slot_name_set().
| void blender::animrig::Action::slot_name_set | ( | Main & | bmain, |
| Slot & | slot, | ||
| StringRefNull | new_name ) |
Set the slot name, ensure it is unique, and propagate the new name to all data-blocks that use it.
This has to be done on the Action level to ensure each slot has a unique name within the Action.
Definition at line 403 of file animrig/intern/action.cc.
References slot(), slot_name_define(), and slot_name_propagate().
Referenced by convert_action_exec(), and version_legacy_actions_to_layered().
| bool blender::animrig::Action::slot_remove | ( | Slot & | slot_to_remove | ) |
Remove a slot, and ALL animation data that belongs to it.
After this call, the reference is no longer valid as the slot will have been freed.
Note that this does NOT unassign this slot from all its users. When the Action is linked into another file, that other file cannot be updated, and so missing slots are something that has to be handled anyway. Also any new slot on this Action will NOT reuse this slot's handle.
Definition at line 520 of file animrig/intern/action.cc.
References find_slot_index(), ActionSlot::handle, layers(), blender::dna::array::remove_index(), bAction::slot_array, bAction::slot_array_num, and blender::animrig::slot_ptr_destructor().
Referenced by animchannels_delete_exec(), and blender::animrig::move_slot().
Set the slot's ID type to that of the animated ID, ensure the name prefix is set accordingly, and that the name is unique within the Action.
This is a low-level function, and shouldn't be called directly outside of the generic slot-assignment functions.
Definition at line 681 of file animrig/intern/action.cc.
References BLI_assert, GS, blender::animrig::Slot::has_idtype(), ActionSlot::idtype, ID::name, and slot().
Referenced by blender::animrig::generic_assign_action_slot().
| blender::Span< Slot * > blender::animrig::Action::slots | ( | ) |
Definition at line 342 of file animrig/intern/action.cc.
References bAction::slot_array, and bAction::slot_array_num.
| blender::Span< const Slot * > blender::animrig::Action::slots | ( | ) | const |
Definition at line 338 of file animrig/intern/action.cc.
References bAction::slot_array, and bAction::slot_array_num.
Referenced by blender::bke::action_blend_write(), blender::bke::action_copy_data(), blender::bke::action_foreach_id(), blender::bke::action_free_data(), animfilter_action_slots(), blender::animrig::legacy::channelbag_ensure(), blender::animrig::legacy::channelbag_get(), convert_action_exec(), find_slot_index(), blender::animrig::generic_assign_action_slot(), blender::animrig::move_slot(), blender::animrig::internal::rebuild_slot_user_cache(), slot_active_get(), slot_active_set(), slot_find_by_name(), slot_for_handle(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| Span< StripKeyframeData * > blender::animrig::Action::strip_keyframe_data | ( | ) |
Definition at line 654 of file animrig/intern/action.cc.
References bAction::strip_keyframe_data_array, and bAction::strip_keyframe_data_array_num.
| Span< const StripKeyframeData * > blender::animrig::Action::strip_keyframe_data | ( | ) | const |
Strip data array access.
Definition at line 645 of file animrig/intern/action.cc.
References bAction::strip_keyframe_data_array, and bAction::strip_keyframe_data_array_num.
Referenced by blender::bke::action_blend_write(), blender::bke::action_copy_data(), blender::bke::action_free_data(), blender::animrig::Strip::data(), and blender::animrig::Strip::data().
|
protected |
Append the given StripKeyframeData item to the action's keyframe data array.
Note: this takes ownership of strip_data.
Definition at line 599 of file animrig/intern/action.cc.
References BLI_assert, blender::animrig::grow_array_and_append(), bAction::strip_keyframe_data_array, and bAction::strip_keyframe_data_array_num.
Referenced by blender::animrig::Strip::create().
|
protected |
Remove the keyframe strip data at index if it is no longer used anywhere in the action.
If the strip data is unused, it is both removed from the array and freed. Otherwise no changes are made and the action remains as-is.
Note: this may alter the indices of some strip data items, due to items shifting around to fill the gap left by the removed item. This method ensures that all indices stored within the action (e.g. in the strips themselves) are properly updated to the new values so that everything is still referencing the same data. However, if any indices are stored outside the action, they will no longer be valid.
Definition at line 609 of file animrig/intern/action.cc.
References BLI_assert, layers(), blender::animrig::shrink_array_and_swap_remove(), bAction::strip_keyframe_data_array, and bAction::strip_keyframe_data_array_num.
Referenced by blender::animrig::Layer::strip_remove().
|
protected |
Definition at line 345 of file ANIM_action.hh.
|
protected |
Definition at line 344 of file ANIM_action.hh.