|
Blender V5.0
|
#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 |
| animrig::Channelbag * | channelbag_for_slot (StringRef slot_identifier) |
| void | debug_print () const |
Public Attributes | |
| animrig::StripKeyframeData | keyframe_data |
| animrig::slot_handle_t | last_used_slot_handle = DEFAULT_LAST_USED_SLOT_HANDLE |
| Map< animrig::slot_handle_t, std::string > | slot_identifiers |
| Map< 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 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 33 of file keyframes_general_intern.hh.
|
default |
Referenced by KeyframeCopyBuffer().
|
delete |
References KeyframeCopyBuffer().
|
default |
| animrig::Channelbag * blender::ed::animation::KeyframeCopyBuffer::channelbag_for_slot | ( | StringRef | slot_identifier | ) |
Definition at line 1294 of file keyframes_general.cc.
References keyframe_data, and slot_identifiers.
| void blender::ed::animation::KeyframeCopyBuffer::debug_print | ( | ) | const |
Print the contents of the copy buffer to stdout.
Definition at line 1307 of file keyframes_general.cc.
References current_frame, first_frame, is_bone(), is_empty(), is_single_fcurve(), keyframe_data, last_frame, slot_identifiers, and SLOTLESS_SLOT_IDENTIFIER.
| bool blender::ed::animation::KeyframeCopyBuffer::is_bone | ( | const FCurve & | fcurve | ) | const |
Definition at line 1276 of file keyframes_general.cc.
References bone_fcurves.
Referenced by debug_print().
| bool blender::ed::animation::KeyframeCopyBuffer::is_empty | ( | ) | const |
Definition at line 1259 of file keyframes_general.cc.
References keyframe_data.
Referenced by debug_print().
| bool blender::ed::animation::KeyframeCopyBuffer::is_single_fcurve | ( | ) | const |
Definition at line 1266 of file keyframes_general.cc.
References blender::animrig::Channelbag::fcurves(), and keyframe_data.
Referenced by debug_print().
| int blender::ed::animation::KeyframeCopyBuffer::num_slots | ( | ) | const |
Definition at line 1281 of file keyframes_general.cc.
References BLI_assert, and keyframe_data.
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 90 of file keyframes_general_intern.hh.
Referenced by 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 97 of file keyframes_general_intern.hh.
Referenced by debug_print().
|
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 58 of file keyframes_general_intern.hh.
| float blender::ed::animation::KeyframeCopyBuffer::first_frame = std::numeric_limits<float>::infinity() |
Definition at line 93 of file keyframes_general_intern.hh.
Referenced by debug_print().
| 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 42 of file keyframes_general_intern.hh.
Referenced by channelbag_for_slot(), debug_print(), is_empty(), is_single_fcurve(), and num_slots().
| float blender::ed::animation::KeyframeCopyBuffer::last_frame = -std::numeric_limits<float>::infinity() |
Definition at line 94 of file keyframes_general_intern.hh.
Referenced by debug_print().
| animrig::slot_handle_t blender::ed::animation::KeyframeCopyBuffer::last_used_slot_handle = DEFAULT_LAST_USED_SLOT_HANDLE |
Definition at line 59 of file keyframes_general_intern.hh.
| Map<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 83 of file keyframes_general_intern.hh.
| Map<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 69 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 50 of file keyframes_general_intern.hh.
Referenced by debug_print(), and blender::ed::animation::pastebuf_find_matching_copybuf_item().