|
Blender V4.3
|
#include <ANIM_action.hh>
Inherits ActionSlot.
Public Types | |
| enum class | Flags : uint8_t { Expanded = (1 << 0) , Selected = (1 << 1) , Active = (1 << 2) } |
Public Member Functions | |
| Slot () | |
| Slot (const Slot &other) | |
| ~Slot () | |
| void | blend_read_post () |
| std::string | name_prefix_for_idtype () const |
| StringRefNull | name_without_prefix () const |
| bool | is_suitable_for (const ID &animated_id) const |
| bool | has_idtype () const |
| Flags | flags () const |
| bool | is_expanded () const |
| void | set_expanded (bool expanded) |
| bool | is_selected () const |
| void | set_selected (bool selected) |
| bool | is_active () const |
| Span< ID * > | users (Main &bmain) const |
| Vector< ID * > | runtime_users () |
| void | users_add (ID &animated_id) |
| void | users_remove (ID &animated_id) |
Static Public Member Functions | |
| static void | users_invalidate (Main &bmain) |
Static Public Attributes | |
| static constexpr slot_handle_t | unassigned = 0 |
| static constexpr int | name_length_min = 3 |
| static constexpr int | name_length_max = MAX_ID_NAME |
Protected Member Functions | |
| void | name_ensure_prefix () |
| void | set_active (bool active) |
Protected Attributes | |
| friend | Action |
Additional Inherited Members | |
Public Attributes inherited from ActionSlot | |
| char | name [66] |
| uint8_t | _pad0 [2] |
| int | idtype |
| int32_t | handle |
| int8_t | slot_flags |
| uint8_t | _pad1 [3] |
| ActionSlotRuntimeHandle * | runtime |
Identifier for a sub-set of the animation data inside an Action.
An animatable ID specifies both an Action* and an ActionSlot::handle to identify which F-Curves (and in the future other animation data) it will be animated by.
This is called a 'slot' because it binds the animatable ID to the sub-set of animation data that should animate it.
Definition at line 605 of file ANIM_action.hh.
|
strong |
| blender::animrig::Slot::Slot | ( | ) |
Definition at line 982 of file animrig/intern/action.cc.
References ActionSlot::runtime.
|
explicit |
Definition at line 988 of file animrig/intern/action.cc.
References ActionSlot::runtime.
| blender::animrig::Slot::~Slot | ( | ) |
Definition at line 994 of file animrig/intern/action.cc.
References ActionSlot::runtime.
| void blender::animrig::Slot::blend_read_post | ( | ) |
Update the Slot after reading it from a blend file.
This is a low-level function and should not typically be used. It's only here to let blenkernel allocate the runtime struct when reading a Slot from disk, without having to share the struct definition itself.
Definition at line 999 of file animrig/intern/action.cc.
References BLI_assert, and ActionSlot::runtime.
| Slot::Flags blender::animrig::Slot::flags | ( | ) | const |
Definition at line 1022 of file animrig/intern/action.cc.
References ActionSlot::slot_flags.
| bool blender::animrig::Slot::has_idtype | ( | ) | const |
Return whether this Slot has an idtype set.
Definition at line 1017 of file animrig/intern/action.cc.
References ActionSlot::idtype.
Referenced by getname_anim_fcurve_for_slot(), is_suitable_for(), name_ensure_prefix(), name_prefix_for_idtype(), and blender::animrig::Action::slot_setup_for_id().
| bool blender::animrig::Slot::is_active | ( | ) | const |
Definition at line 1054 of file animrig/intern/action.cc.
References Active, and ActionSlot::slot_flags.
Referenced by ANIM_is_active_channel(), blender::animrig::Action::slot_active_get(), and blender::animrig::tests::TEST_F().
| bool blender::animrig::Slot::is_expanded | ( | ) | const |
Definition at line 1026 of file animrig/intern/action.cc.
References Expanded, and ActionSlot::slot_flags.
Referenced by animfilter_action_slot().
| bool blender::animrig::Slot::is_selected | ( | ) | const |
Definition at line 1040 of file animrig/intern/action.cc.
References Selected, and ActionSlot::slot_flags.
Referenced by anim_channels_selection_flag_for_toggle(), animfilter_action_slot(), and click_select_channel_action_slot().
| bool blender::animrig::Slot::is_suitable_for | ( | const ID & | animated_id | ) | const |
Return whether this Slot is usable by this ID type.
Definition at line 1005 of file animrig/intern/action.cc.
References GS, has_idtype(), ActionSlot::idtype, and ID::name.
Referenced by blender::animrig::assign_action_ensure_slot_for_keying(), blender::animrig::Action::find_suitable_slot_for(), and blender::animrig::generic_assign_action_slot().
|
protected |
Ensure the first two characters of the name match the ID type.
Definition at line 1129 of file animrig/intern/action.cc.
References BLI_assert, has_idtype(), ActionSlot::idtype, ActionSlot::name, name_length_min, and size().
| std::string blender::animrig::Slot::name_prefix_for_idtype | ( | ) | const |
Return the name prefix for the Slot's type.
This is the ID name prefix, so "OB" for objects, "CA" for cameras, etc.
Definition at line 1107 of file animrig/intern/action.cc.
References has_idtype(), ActionSlot::idtype, and ActionSlot::name.
Referenced by blender::animrig::tests::TEST_F(), and version_legacy_actions_to_layered().
| StringRefNull blender::animrig::Slot::name_without_prefix | ( | ) | const |
Return the name without the prefix, also known as the "display name".
Definition at line 1118 of file animrig/intern/action.cc.
References BLI_assert, name_length_min, and size().
Referenced by version_legacy_actions_to_layered().
Directly return the runtime users vector.
This function does not refresh the users cache, so it may be out of date.
This is a low-level function, and should only be used when calling users(bmain) is not appropriate.
Definition at line 1077 of file animrig/intern/action.cc.
References BLI_assert_msg, and ActionSlot::runtime.
Referenced by blender::animrig::nla::tests::TEST_F(), blender::animrig::nla::tests::TEST_F(), and blender::animrig::tests::TEST_F().
|
protected |
Set the 'Active' flag. Only allowed to be called by Action.
Definition at line 1058 of file animrig/intern/action.cc.
References Active, and ActionSlot::slot_flags.
Referenced by blender::animrig::Action::slot_active_set().
| void blender::animrig::Slot::set_expanded | ( | bool | expanded | ) |
Definition at line 1030 of file animrig/intern/action.cc.
References Expanded, and ActionSlot::slot_flags.
Referenced by blender::animrig::tests::TEST_F().
| void blender::animrig::Slot::set_selected | ( | bool | selected | ) |
Definition at line 1044 of file animrig/intern/action.cc.
References Selected, and ActionSlot::slot_flags.
Referenced by click_select_channel_action_slot(), mouse_action_keys(), and blender::animrig::tests::TEST_F().
Return the set of IDs that are animated by this Slot.
Definition at line 1068 of file animrig/intern/action.cc.
References BLI_assert, Main::is_action_slot_to_id_map_dirty, blender::animrig::internal::rebuild_slot_user_cache(), and ActionSlot::runtime.
Referenced by achannel_is_part_of_disconnected_slot(), blender::animrig::action_slot_get_id_best_guess(), blender::animrig::action_slot_get_id_for_keying(), getname_anim_fcurve_for_slot(), blender::animrig::move_slot(), and blender::animrig::tests::TEST_F().
| void blender::animrig::Slot::users_add | ( | ID & | animated_id | ) |
Register this ID as animated by this Slot.
This is a low-level function and should not typically be used. Use #Action::assign_id(slot, animated_id) instead.
Definition at line 1083 of file animrig/intern/action.cc.
References BLI_assert, and ActionSlot::runtime.
Referenced by BKE_nla_tweakmode_exit(), and blender::animrig::generic_assign_action_slot().
|
static |
Mark the users cache as 'dirty', triggering a full rebuild next time it is accessed.
This is typically not necessary, and only called from low-level code.
Definition at line 1102 of file animrig/intern/action.cc.
References Main::is_action_slot_to_id_map_dirty.
Referenced by blender::bke::action_foreach_id(), and BKE_animdata_copy_in_lib().
| void blender::animrig::Slot::users_remove | ( | ID & | animated_id | ) |
Register this ID as no longer animated by this Slot.
This is a low-level function and should not typically be used. Use #Action::assign_id(nullptr, animated_id) instead.
Definition at line 1089 of file animrig/intern/action.cc.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of_try(), ActionSlot::runtime, and users.
Referenced by blender::animrig::generic_assign_action_slot().
|
protected |
Definition at line 715 of file ANIM_action.hh.
|
staticconstexpr |
Definition at line 630 of file ANIM_action.hh.
Referenced by blender::animrig::generic_assign_action_slot().
|
staticconstexpr |
Slot names consist of a two-character ID code, then the display name. This means that the minimum length of a valid name is 3 characters.
Definition at line 628 of file ANIM_action.hh.
Referenced by name_ensure_prefix(), name_without_prefix(), and blender::animrig::Action::slot_name_define().
|
staticconstexpr |
Slot handle value indicating that there is no slot assigned.
Definition at line 622 of file ANIM_action.hh.
Referenced by animfilter_action(), BKE_animdata_transfer_by_basepath(), BKE_animsys_evaluate_animdata(), BKE_nla_tweakmode_exit(), blender::animrig::channelbag_for_action_slot(), blender::animrig::generic_assign_action(), blender::animrig::generic_assign_action_slot(), blender::animrig::generic_assign_action_slot_handle(), blender::animrig::Action::is_slot_animated(), nla_tweakmode_exit_nofollowptr(), blender::animrig::Action::slot_for_handle(), blender::animrig::nla::tests::TEST_F(), blender::animrig::nla::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::nla::unassign_action().