Blender V5.0
blender::animrig::StripKeyframeData Class Reference

#include <ANIM_action.hh>

Inherits ActionStripKeyframeData.

Public Member Functions

 StripKeyframeData ()=default
 StripKeyframeData (const StripKeyframeData &other)
 ~StripKeyframeData ()
blender::Span< const Channelbag * > channelbags () const
blender::Span< Channelbag * > channelbags ()
const Channelbagchannelbag (int64_t index) const
Channelbagchannelbag (int64_t index)
const Channelbagchannelbag_for_slot (const Slot &slot) const
Channelbagchannelbag_for_slot (const Slot &slot)
const Channelbagchannelbag_for_slot (slot_handle_t slot_handle) const
Channelbagchannelbag_for_slot (slot_handle_t slot_handle)
Channelbagchannelbag_for_slot_add (const Slot &slot)
Channelbagchannelbag_for_slot_add (slot_handle_t slot_handle)
Channelbagchannelbag_for_slot_ensure (const Slot &slot)
Channelbagchannelbag_for_slot_ensure (slot_handle_t slot_handle)
bool channelbag_remove (Channelbag &channelbag_to_remove)
void slot_data_remove (slot_handle_t slot_handle)
void slot_data_duplicate (slot_handle_t source_slot_handle, slot_handle_t target_slot_handle)
int64_t find_channelbag_index (const Channelbag &channelbag) const
SingleKeyingResult keyframe_insert (Main *bmain, const Slot &slot, const FCurveDescriptor &fcurve_descriptor, float2 time_value, const KeyframeSettings &settings, eInsertKeyFlags insert_key_flags=INSERTKEY_NOFLAGS, std::optional< float2 > cycle_range=std::nullopt)

Static Public Attributes

static constexpr Strip::Type TYPE = Strip::Type::Keyframe

Additional Inherited Members

Public Attributes inherited from ActionStripKeyframeData
struct ActionChannelbag ** channelbag_array
int channelbag_array_num
uint8_t _pad [4]

Detailed Description

Keyframe animation data for a keyframe strip.

This contains a set of Channelbags, up to one for each slot in the owning action. Each Channelbag contains the keyframe animation data for the slot it corresponds to.

See also
ChannelBag

Definition at line 975 of file ANIM_action.hh.

Constructor & Destructor Documentation

◆ StripKeyframeData() [1/2]

◆ StripKeyframeData() [2/2]

blender::animrig::StripKeyframeData::StripKeyframeData ( const StripKeyframeData & other)
explicit

◆ ~StripKeyframeData()

blender::animrig::StripKeyframeData::~StripKeyframeData ( )

Member Function Documentation

◆ channelbag() [1/2]

Channelbag * blender::animrig::StripKeyframeData::channelbag ( int64_t index)

◆ channelbag() [2/2]

◆ channelbag_for_slot() [1/4]

Channelbag * blender::animrig::StripKeyframeData::channelbag_for_slot ( const Slot & slot)

Definition at line 1764 of file animrig/intern/action.cc.

References channelbag_for_slot(), and ActionSlot::handle.

◆ channelbag_for_slot() [2/4]

◆ channelbag_for_slot() [3/4]

Channelbag * blender::animrig::StripKeyframeData::channelbag_for_slot ( slot_handle_t slot_handle)

Definition at line 1754 of file animrig/intern/action.cc.

References StripKeyframeData().

◆ channelbag_for_slot() [4/4]

const Channelbag * blender::animrig::StripKeyframeData::channelbag_for_slot ( slot_handle_t slot_handle) const

Definition at line 1736 of file animrig/intern/action.cc.

References channelbags().

◆ channelbag_for_slot_add() [1/2]

Channelbag & blender::animrig::StripKeyframeData::channelbag_for_slot_add ( const Slot & slot)

Add a channelbag for the given slot.

Should only be called when there is no Channelbag for this slot yet.

Definition at line 1769 of file animrig/intern/action.cc.

References channelbag_for_slot_add(), and ActionSlot::handle.

Referenced by channelbag_for_slot_add(), channelbag_for_slot_ensure(), and StripKeyframeData().

◆ channelbag_for_slot_add() [2/2]

◆ channelbag_for_slot_ensure() [1/2]

◆ channelbag_for_slot_ensure() [2/2]

Channelbag & blender::animrig::StripKeyframeData::channelbag_for_slot_ensure ( slot_handle_t slot_handle)

◆ channelbag_remove()

bool blender::animrig::StripKeyframeData::channelbag_remove ( Channelbag & channelbag_to_remove)

Remove the given channelbag from this strip data.

After this call the reference is no longer valid, as the memory will have been freed.

Returns
true when the channelbag was found & removed, false if it wasn't found.

Definition at line 1809 of file animrig/intern/action.cc.

References ActionStripKeyframeData::channelbag_array, ActionStripKeyframeData::channelbag_array_num, blender::animrig::channelbag_ptr_destructor(), find_channelbag_index(), and blender::dna::array::remove_index().

Referenced by slot_data_remove(), and StripKeyframeData().

◆ channelbags() [1/2]

blender::Span< Channelbag * > blender::animrig::StripKeyframeData::channelbags ( )

◆ channelbags() [2/2]

◆ find_channelbag_index()

int64_t blender::animrig::StripKeyframeData::find_channelbag_index ( const Channelbag & channelbag) const

Return the index of channelbag in this strip data's channelbag array, or -1 if channelbag doesn't exist in this strip data.

Definition at line 1745 of file animrig/intern/action.cc.

References channelbag(), and ActionStripKeyframeData::channelbag_array_num.

Referenced by channelbag_remove(), blender::animrig::move_slot(), and StripKeyframeData().

◆ keyframe_insert()

SingleKeyingResult blender::animrig::StripKeyframeData::keyframe_insert ( Main * bmain,
const Slot & slot,
const FCurveDescriptor & fcurve_descriptor,
float2 time_value,
const KeyframeSettings & settings,
eInsertKeyFlags insert_key_flags = INSERTKEY_NOFLAGS,
std::optional< float2 > cycle_range = std::nullopt )

◆ slot_data_duplicate()

void blender::animrig::StripKeyframeData::slot_data_duplicate ( slot_handle_t source_slot_handle,
slot_handle_t target_slot_handle )

Clone the channelbag belonging to the source slot, and assign it to the target slot.

This is typically only called from duplicate_slot().

Definition at line 1834 of file animrig/intern/action.cc.

References BLI_assert, ActionStripKeyframeData::channelbag_array, ActionStripKeyframeData::channelbag_array_num, channelbag_for_slot(), blender::animrig::grow_array_and_append(), and ActionChannelbag::slot_handle.

Referenced by blender::animrig::duplicate_slot(), and StripKeyframeData().

◆ slot_data_remove()

void blender::animrig::StripKeyframeData::slot_data_remove ( slot_handle_t slot_handle)

Remove all strip data for the given slot.

Definition at line 1825 of file animrig/intern/action.cc.

References channelbag(), channelbag_for_slot(), and channelbag_remove().

Referenced by StripKeyframeData().

Member Data Documentation

◆ TYPE

Strip::Type blender::animrig::StripKeyframeData::TYPE = Strip::Type::Keyframe
staticconstexpr

Definition at line 978 of file ANIM_action.hh.

Referenced by blender::animrig::Strip::data(), and blender::animrig::Strip::data().


The documentation for this class was generated from the following files: