|
Blender V5.3
|
#include <keyframes_general_intern.hh>
Public Member Functions | |
| KeyframeCopyBuffer ()=default | |
| KeyframeCopyBuffer (const KeyframeCopyBuffer &other)=delete | |
| ~KeyframeCopyBuffer ()=default | |
| bool | is_empty () const |
| bool | is_single_fcurve () const |
| bool | is_bone (const FCurve &fcurve) const |
| int | num_slots () const |
| blender::animrig::Channelbag * | channelbag_for_slot (StringRef slot_identifier) |
| void | debug_print () const |
Public Attributes | |
| blender::animrig::StripKeyframeData | keyframe_data |
| blender::animrig::slot_handle_t | last_used_slot_handle = DEFAULT_LAST_USED_SLOT_HANDLE |
| Map< blender::animrig::slot_handle_t, std::string > | slot_identifiers |
| Map< blender::animrig::slot_handle_t, ID * > | slot_animated_ids |
| Set< const FCurve * > | bone_fcurves |
| float | first_frame = std::numeric_limits<float>::infinity() |
| float | last_frame = -std::numeric_limits<float>::infinity() |
| float | current_frame = 0.0f |
Static Public Attributes | |
| static constexpr const char * | SLOTLESS_SLOT_IDENTIFIER = "" |
| static constexpr blender::animrig::slot_handle_t | DEFAULT_LAST_USED_SLOT_HANDLE = 0x1acca |
Global copy/paste buffer for multi-slotted keyframe data.
All the animation data managed by this struct is copied into it, and thus owned by this struct.
Definition at line 35 of file keyframes_general_intern.hh.
|
default |
Referenced by KeyframeCopyBuffer().
|
delete |
References KeyframeCopyBuffer().
|
default |
References channelbag_for_slot(), debug_print(), is_bone(), is_empty(), is_single_fcurve(), and num_slots().
| animrig::Channelbag * blender::ed::animation::KeyframeCopyBuffer::channelbag_for_slot | ( | StringRef | slot_identifier | ) |
Definition at line 1300 of file keyframes_general.cc.
References blender::animrig::StripKeyframeData::channelbag_for_slot(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), keyframe_data, and slot_identifiers.
Referenced by blender::ed::animation::pastebuf_find_matching_copybuf_item(), and ~KeyframeCopyBuffer().
| void blender::ed::animation::KeyframeCopyBuffer::debug_print | ( | ) | const |
Print the contents of the copy buffer to stdout.
Definition at line 1313 of file keyframes_general.cc.
References blender::animrig::StripKeyframeData::channelbags(), current_frame, first_frame, is_bone(), is_empty(), is_single_fcurve(), keyframe_data, last_frame, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), slot_identifiers, and SLOTLESS_SLOT_IDENTIFIER.
Referenced by blender::copy_animedit_keys(), and ~KeyframeCopyBuffer().
| bool blender::ed::animation::KeyframeCopyBuffer::is_bone | ( | const FCurve & | fcurve | ) | const |
Definition at line 1282 of file keyframes_general.cc.
References bone_fcurves.
Referenced by debug_print(), blender::ed::animation::do_curve_mirror_flippping(), blender::ed::animation::pastebuf_match_path_full(), and ~KeyframeCopyBuffer().
| bool blender::ed::animation::KeyframeCopyBuffer::is_empty | ( | ) | const |
Definition at line 1265 of file keyframes_general.cc.
References blender::animrig::StripKeyframeData::channelbags(), and keyframe_data.
Referenced by blender::copy_animedit_keys(), debug_print(), blender::paste_animedit_keys(), and ~KeyframeCopyBuffer().
| bool blender::ed::animation::KeyframeCopyBuffer::is_single_fcurve | ( | ) | const |
Definition at line 1272 of file keyframes_general.cc.
References blender::animrig::StripKeyframeData::channelbag(), blender::animrig::StripKeyframeData::channelbags(), blender::animrig::Channelbag::fcurves(), and keyframe_data.
Referenced by debug_print(), blender::paste_animedit_keys(), and ~KeyframeCopyBuffer().
| int blender::ed::animation::KeyframeCopyBuffer::num_slots | ( | ) | const |
Definition at line 1287 of file keyframes_general.cc.
References blender::BLI_assert(), blender::animrig::StripKeyframeData::channelbags(), and keyframe_data.
Referenced by blender::ed::animation::get_slot_match_method(), and ~KeyframeCopyBuffer().
Pointers to F-Curves in this->keyframe_data that animate bones.
This is mostly to indicate which F-Curves are flipped when pasting flipped.
Definition at line 92 of file keyframes_general_intern.hh.
Referenced by blender::copy_animedit_keys(), and is_bone().
| float blender::ed::animation::KeyframeCopyBuffer::current_frame = 0.0f |
The current scene frame when copying. Used for the 'relative' paste method.
Definition at line 99 of file keyframes_general_intern.hh.
Referenced by blender::copy_animedit_keys(), debug_print(), and blender::paste_animedit_keys().
|
staticconstexpr |
Just a more-or-less randomly chosen number to start at.
Having this distinctly different from DNA_DEFAULT_ACTION_LAST_SLOT_HANDLE makes it easier to spot bugs.
Definition at line 60 of file keyframes_general_intern.hh.
| float blender::ed::animation::KeyframeCopyBuffer::first_frame = std::numeric_limits<float>::infinity() |
Definition at line 95 of file keyframes_general_intern.hh.
Referenced by blender::copy_animedit_keys(), debug_print(), blender::paste_animedit_keys(), and blender::ed::animation::paste_animedit_keys_fcurve().
| blender::animrig::StripKeyframeData blender::ed::animation::KeyframeCopyBuffer::keyframe_data |
The copied keyframes, in a ChannelBag per slot.
Note that the slot handles are arbitrary, and are likely different from the handles of the original slots (i.e. the ones that the copied F-Curves were for). This is to make it possible to copy from different Actions (like is possible on the dope sheet) and still distinguish between their slots.
Definition at line 44 of file keyframes_general_intern.hh.
Referenced by channelbag_for_slot(), debug_print(), is_empty(), is_single_fcurve(), num_slots(), blender::paste_animedit_keys(), and blender::ed::animation::pastebuf_find_matching_copybuf_item().
| float blender::ed::animation::KeyframeCopyBuffer::last_frame = -std::numeric_limits<float>::infinity() |
Definition at line 96 of file keyframes_general_intern.hh.
Referenced by blender::copy_animedit_keys(), debug_print(), blender::paste_animedit_keys(), and blender::ed::animation::paste_animedit_keys_fcurve().
| blender::animrig::slot_handle_t blender::ed::animation::KeyframeCopyBuffer::last_used_slot_handle = DEFAULT_LAST_USED_SLOT_HANDLE |
Definition at line 61 of file keyframes_general_intern.hh.
| Map<blender::animrig::slot_handle_t, ID *> blender::ed::animation::KeyframeCopyBuffer::slot_animated_ids |
Mapping from slot handles to the ID that they were copied from.
Multiple IDs can be animated by a single slot, in which case an arbitrary one is stored here. This pointer is only used to resolve RNA paths to find the property name, and thus the exact ID doesn't matter much.
TODO(@sybren): it would be better to track the ID name here, instead of the pointer. That'll make it safer to work with when pasting into another file, or after the copied-from ID has been deleted. For now I am trying to keep things feature-par with the original code this is replacing.
Definition at line 85 of file keyframes_general_intern.hh.
| Map<blender::animrig::slot_handle_t, std::string> blender::ed::animation::KeyframeCopyBuffer::slot_identifiers |
Mapping from slot handles to their identifiers.
Since the StripKeyframeData only stores slot handles, and not their identifiers, this has to be stored here. An alternative would be to store the copied data into an Action, but that would allow for multi-layer, multi-strip data which is overkill for the functionality needed here.
Definition at line 71 of file keyframes_general_intern.hh.
Referenced by channelbag_for_slot(), and debug_print().
|
staticconstexpr |
Slot identifier used for slotless keyframes.
These are keyframes copied from F-Curves not owned by an Action, such as drivers and NLA control curves.
Definition at line 52 of file keyframes_general_intern.hh.
Referenced by debug_print(), and blender::ed::animation::pastebuf_find_matching_copybuf_item().