Blender V5.0
ED_keyframes_keylist.hh File Reference

Go to the source code of this file.

Classes

struct  ActKeyBlockInfo
struct  ActKeyColumn

Namespaces

namespace  blender
namespace  blender::animrig

Enumerations

enum  eActKeyBlock_Hold {
  ACTKEYBLOCK_FLAG_MOVING_HOLD = (1 << 0) , ACTKEYBLOCK_FLAG_STATIC_HOLD = (1 << 1) , ACTKEYBLOCK_FLAG_ANY_HOLD = (1 << 2) , ACTKEYBLOCK_FLAG_NON_BEZIER = (1 << 3) ,
  ACTKEYBLOCK_FLAG_GPENCIL = (1 << 4)
}
enum  eKeyframeShapeDrawOpts { KEYFRAME_SHAPE_FRAME = 0 , KEYFRAME_SHAPE_INSIDE , KEYFRAME_SHAPE_BOTH }
enum  eKeyframeHandleDrawOpts {
  KEYFRAME_HANDLE_NONE = 0 , KEYFRAME_HANDLE_AUTO_CLAMP , KEYFRAME_HANDLE_AUTO , KEYFRAME_HANDLE_VECTOR ,
  KEYFRAME_HANDLE_ALIGNED , KEYFRAME_HANDLE_FREE
}
enum  eKeyframeExtremeDrawOpts {
  KEYFRAME_EXTREME_NONE = 0 , KEYFRAME_EXTREME_MIN = (1 << 0) , KEYFRAME_EXTREME_MAX = (1 << 1) , KEYFRAME_EXTREME_MIXED = (1 << 2) ,
  KEYFRAME_EXTREME_FLAT = (1 << 3)
}

Functions

AnimKeylistED_keylist_create ()
void ED_keylist_free (AnimKeylist *keylist)
void ED_keylist_prepare_for_direct_access (AnimKeylist *keylist)
const ActKeyColumnED_keylist_find_exact (const AnimKeylist *keylist, float cfra)
const ActKeyColumnED_keylist_find_next (const AnimKeylist *keylist, float cfra)
const ActKeyColumnED_keylist_find_prev (const AnimKeylist *keylist, float cfra)
const ActKeyColumnED_keylist_find_closest (const AnimKeylist *keylist, float cfra)
const ActKeyColumnED_keylist_find_any_between (const AnimKeylist *keylist, const blender::Bounds< float > frame_range)
bool ED_keylist_is_empty (const AnimKeylist *keylist)
const ListBaseED_keylist_listbase (const AnimKeylist *keylist)
bool ED_keylist_all_keys_frame_range (const AnimKeylist *keylist, blender::Bounds< float > *r_frame_range)
bool ED_keylist_selected_keys_frame_range (const AnimKeylist *keylist, blender::Bounds< float > *r_frame_range)
const ActKeyColumnED_keylist_array (const AnimKeylist *keylist)
int64_t ED_keylist_array_len (const AnimKeylist *keylist)
void fcurve_to_keylist (AnimData *adt, FCurve *fcu, AnimKeylist *keylist, int saction_flag, blender::float2 range, bool use_nla_remapping)
void action_group_to_keylist (AnimData *adt, bActionGroup *agrp, AnimKeylist *keylist, int saction_flag, blender::float2 range)
void action_to_keylist (AnimData *adt, bAction *dna_action, AnimKeylist *keylist, int saction_flag, blender::float2 range)
void ob_to_keylist (bDopeSheet *ads, Object *ob, AnimKeylist *keylist, int saction_flag, blender::float2 range)
void cachefile_to_keylist (bDopeSheet *ads, CacheFile *cache_file, AnimKeylist *keylist, int saction_flag)
void scene_to_keylist (bDopeSheet *ads, Scene *sce, AnimKeylist *keylist, int saction_flag, blender::float2 range)
void summary_to_keylist (bAnimContext *ac, AnimKeylist *keylist, int saction_flag, blender::float2 range)
void action_slot_summary_to_keylist (bAnimContext *ac, ID *animated_id, blender::animrig::Action &action, blender::animrig::slot_handle_t slot_handle, AnimKeylist *keylist, int saction_flag, blender::float2 range)
void gpencil_to_keylist (bDopeSheet *ads, bGPdata *gpd, AnimKeylist *keylist, bool active)
void grease_pencil_cels_to_keylist (AnimData *adt, const GreasePencilLayer *gpl, AnimKeylist *keylist, int saction_flag)
void grease_pencil_layer_group_to_keylist (AnimData *adt, const GreasePencilLayerTreeGroup *layer_group, AnimKeylist *keylist, const int saction_flag)
void grease_pencil_data_block_to_keylist (AnimData *adt, const GreasePencil *grease_pencil, AnimKeylist *keylist, const int saction_flag, bool active_layer_only)
void gpl_to_keylist (bDopeSheet *ads, bGPDlayer *gpl, AnimKeylist *keylist)
void mask_to_keylist (bDopeSheet *ads, MaskLayer *masklay, AnimKeylist *keylist)
void sequencer_strip_to_keylist (const Strip &strip, AnimKeylist &keylist, Scene &scene)
bool actkeyblock_is_valid (const ActKeyColumn *ac)
int actkeyblock_get_valid_hold (const ActKeyColumn *ac)

Enumeration Type Documentation

◆ eActKeyBlock_Hold

ActKeyBlockInfo - Flag.

Enumerator
ACTKEYBLOCK_FLAG_MOVING_HOLD 

Key block represents a moving hold.

ACTKEYBLOCK_FLAG_STATIC_HOLD 

Key block represents a static hold

ACTKEYBLOCK_FLAG_ANY_HOLD 

Key block represents any kind of hold.

ACTKEYBLOCK_FLAG_NON_BEZIER 

The curve segment uses non-bezier interpolation.

ACTKEYBLOCK_FLAG_GPENCIL 

The block is grease pencil.

Definition at line 84 of file ED_keyframes_keylist.hh.

◆ eKeyframeExtremeDrawOpts

Extreme type.

Enumerator
KEYFRAME_EXTREME_NONE 
KEYFRAME_EXTREME_MIN 

Minimum present.

KEYFRAME_EXTREME_MAX 

Maximum present.

KEYFRAME_EXTREME_MIXED 

Grouped keys have different states.

KEYFRAME_EXTREME_FLAT 

Both neighbors are equal to this key.

Definition at line 122 of file ED_keyframes_keylist.hh.

◆ eKeyframeHandleDrawOpts

Handle type.

Enumerator
KEYFRAME_HANDLE_NONE 
KEYFRAME_HANDLE_AUTO_CLAMP 
KEYFRAME_HANDLE_AUTO 
KEYFRAME_HANDLE_VECTOR 
KEYFRAME_HANDLE_ALIGNED 
KEYFRAME_HANDLE_FREE 

Definition at line 110 of file ED_keyframes_keylist.hh.

◆ eKeyframeShapeDrawOpts

Options for keyframe shape drawing.

Enumerator
KEYFRAME_SHAPE_FRAME 
KEYFRAME_SHAPE_INSIDE 
KEYFRAME_SHAPE_BOTH 

Definition at line 100 of file ED_keyframes_keylist.hh.

Function Documentation

◆ action_group_to_keylist()

◆ action_slot_summary_to_keylist()

void action_slot_summary_to_keylist ( bAnimContext * ac,
ID * animated_id,
blender::animrig::Action & action,
blender::animrig::slot_handle_t slot_handle,
AnimKeylist * keylist,
int saction_flag,
blender::float2 range )

Generate a summary channel keylist for the specified slot, merging it into keylist.

This filters the keys to be consistent with the visible channels in the editor indicated by ac

Parameters
animated_idthe particular animated ID that the slot summary is being generated for. This is needed for filtering channels based on bone selection, etc. NOTE: despite being passed as a pointer, this should never be null. It's currently passed as a pointer to be defensive because I (Nathan) am not 100% confident at the time of writing (PR #134922) that the callers of this actually guarantee a non-null pointer (they should, but bugs). This way we can assert internally to catch if that ever happens.
actionthe action containing the slot to generate the summary for.
slot_handlethe handle of the slot to generate the summary for.
keylistthe keylist that the generated summary will be merged into.
saction_flagneeded for the SACTION_SHOW_EXTREMES flag, to determine whether to compute and store the data needed to determine which keys are "extremes" (local maxima/minima).
rangeonly keys within this time range will be included in the summary.

Definition at line 1057 of file keyframes_keylist.cc.

References ALE_FCURVE, ANIM_animdata_freelist(), ANIM_animfilter_action_slot(), ANIM_nla_mapping_allowed(), ANIMFILTER_DATA_VISIBLE, BLI_assert, fcurve_to_keylist(), filter, LISTBASE_FOREACH, and blender::animrig::Action::slot_for_handle().

Referenced by actkeys_list_element_to_keylist(), build_channel_keylist(), blender::editor::animation::tests::TEST_F(), and blender::editor::animation::tests::TEST_F().

◆ action_to_keylist()

void action_to_keylist ( AnimData * adt,
bAction * dna_action,
AnimKeylist * keylist,
int saction_flag,
blender::float2 range )

Generate a full list of the keys in dna_action that are within the frame range range.

For layered actions, this is limited to the keys that are for the slot assigned to adt.

Note: this should only be used in places that need or want the full list of keys, without any filtering by e.g. channel selection/visibility, etc. For use cases that need such filtering, use action_slot_summary_to_keylist() instead.

See also
action_slot_summary_to_keylist()

Assumption: the animation is bound to adt->slot_handle. This assumption will break when we have things like reference strips, where the strip can reference another slot handle.

Definition at line 1375 of file keyframes_keylist.cc.

References BLI_assert, bAction::curves, fcurve_to_keylist(), blender::animrig::Action::is_action_legacy(), LISTBASE_FOREACH, and AnimData::slot_handle.

Referenced by actkeys_list_element_to_keylist(), animviz_calc_motionpaths(), build_channel_keylist(), and nla_action_draw_keyframes().

◆ actkeyblock_get_valid_hold()

int actkeyblock_get_valid_hold ( const ActKeyColumn * ac)

Checks if ActKeyColumn can be used as a block (i.e. drawn/used to detect "holds").

Definition at line 996 of file keyframes_keylist.cc.

References ACTKEYBLOCK_FLAG_ANY_HOLD, ACTKEYBLOCK_FLAG_STATIC_HOLD, actkeyblock_is_valid(), ActKeyColumn::block, ActKeyBlockInfo::conflict, and ActKeyBlockInfo::flag.

Referenced by draw_keylist_block().

◆ actkeyblock_is_valid()

bool actkeyblock_is_valid ( const ActKeyColumn * ac)

Checks if ActKeyColumn has any block data.

Definition at line 991 of file keyframes_keylist.cc.

References ActKeyColumn::next, and ActKeyColumn::totblock.

Referenced by actkeyblock_get_valid_hold(), and draw_keylist_block().

◆ cachefile_to_keylist()

◆ ED_keylist_all_keys_frame_range()

bool ED_keylist_all_keys_frame_range ( const AnimKeylist * keylist,
blender::Bounds< float > * r_frame_range )

◆ ED_keylist_array()

const ActKeyColumn * ED_keylist_array ( const AnimKeylist * keylist)

◆ ED_keylist_array_len()

int64_t ED_keylist_array_len ( const AnimKeylist * keylist)

Definition at line 334 of file keyframes_keylist.cc.

References AnimKeylist::column_len.

Referenced by draw_channel_blocks(), and draw_channel_keys().

◆ ED_keylist_create()

◆ ED_keylist_find_any_between()

◆ ED_keylist_find_closest()

◆ ED_keylist_find_exact()

◆ ED_keylist_find_next()

◆ ED_keylist_find_prev()

◆ ED_keylist_free()

◆ ED_keylist_is_empty()

◆ ED_keylist_listbase()

◆ ED_keylist_prepare_for_direct_access()

◆ ED_keylist_selected_keys_frame_range()

bool ED_keylist_selected_keys_frame_range ( const AnimKeylist * keylist,
blender::Bounds< float > * r_frame_range )

Return the selected key-frame's range. If none are selected, return False and do not affect the frame range.

Definition at line 383 of file keyframes_keylist.cc.

References BLI_assert, ActKeyColumn::cfra, ED_keylist_is_empty(), keylist_first_last(), blender::Bounds< T >::max, blender::Bounds< T >::min, ActKeyColumn::next, ActKeyColumn::prev, ActKeyColumn::sel, and SELECT.

Referenced by animviz_motionpath_compute_range().

◆ fcurve_to_keylist()

void fcurve_to_keylist ( AnimData * adt,
FCurve * fcu,
AnimKeylist * keylist,
int saction_flag,
blender::float2 range,
bool use_nla_remapping )

◆ gpencil_to_keylist()

void gpencil_to_keylist ( bDopeSheet * ads,
bGPdata * gpd,
AnimKeylist * keylist,
bool active )

◆ gpl_to_keylist()

◆ grease_pencil_cels_to_keylist()

◆ grease_pencil_data_block_to_keylist()

void grease_pencil_data_block_to_keylist ( AnimData * adt,
const GreasePencil * grease_pencil,
AnimKeylist * keylist,
const int saction_flag,
bool active_layer_only )

◆ grease_pencil_layer_group_to_keylist()

◆ mask_to_keylist()

◆ ob_to_keylist()

◆ scene_to_keylist()

◆ sequencer_strip_to_keylist()

◆ summary_to_keylist()