Blender V4.3
keyframes_draw.cc File Reference
#include <cfloat>
#include "MEM_guardedalloc.h"
#include "BKE_grease_pencil.hh"
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "DNA_anim_types.h"
#include "DNA_gpencil_legacy_types.h"
#include "DNA_grease_pencil_types.h"
#include "DNA_mask_types.h"
#include "GPU_immediate.hh"
#include "GPU_shader_shared.hh"
#include "GPU_state.hh"
#include "UI_interface.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "ED_anim_api.hh"
#include "ED_keyframes_draw.hh"
#include "ED_keyframes_keylist.hh"
#include "ANIM_action.hh"

Go to the source code of this file.

Classes

struct  DrawKeylistUIData
 
struct  ChannelListElement
 
struct  ChannelDrawList
 

Enumerations

enum class  ChannelType {
  SUMMARY , SCENE , OBJECT , FCURVE ,
  ACTION_LAYERED , ACTION_SLOT , ACTION_LEGACY , ACTION_GROUP ,
  GREASE_PENCIL_CELS , GREASE_PENCIL_GROUP , GREASE_PENCIL_DATA , GREASE_PENCIL_LAYER ,
  MASK_LAYER
}
 

Functions

void draw_keyframe_shape (const float x, const float y, float size, const bool sel, const eBezTriple_KeyframeType key_type, const eKeyframeShapeDrawOpts mode, const float alpha, const KeyframeShaderBindings *sh_bindings, const short handle_type, const short extreme_type)
 
static void channel_ui_data_init (DrawKeylistUIData *ctx, View2D *v2d, float yscale_fac, bool channel_locked, eSAction_Flag saction_flag)
 
static void draw_keylist_block_gpencil (const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
 
static void draw_keylist_block_moving_hold (const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
 
static void draw_keylist_block_standard (const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
 
static void draw_keylist_block_interpolation_line (const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
 
static void draw_keylist_block (const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
 
static void draw_keylist_blocks (const DrawKeylistUIData *ctx, const ActKeyColumn *keys, const int key_len, float ypos)
 
static bool draw_keylist_is_visible_key (const View2D *v2d, const ActKeyColumn *ak)
 
static void draw_keylist_keys (const DrawKeylistUIData *ctx, View2D *v2d, const KeyframeShaderBindings *sh_bindings, const ActKeyColumn *keys, const int key_len, float ypos, eSAction_Flag saction_flag)
 
static void build_channel_keylist (ChannelListElement *elem, blender::float2 range)
 
static void draw_channel_blocks (ChannelListElement *elem, View2D *v2d)
 
static void draw_channel_keys (ChannelListElement *elem, View2D *v2d, const KeyframeShaderBindings *sh_bindings)
 
static void prepare_channel_for_drawing (ChannelListElement *elem)
 
ChannelDrawListED_channel_draw_list_create ()
 
static void channel_list_build_keylists (ChannelDrawList *channel_list, blender::float2 range)
 
static void channel_list_draw_blocks (ChannelDrawList *channel_list, View2D *v2d)
 
static int channel_visible_key_len (const View2D *v2d, const ListBase *keys)
 
static int channel_list_visible_key_len (const ChannelDrawList *channel_list, const View2D *v2d)
 
static void channel_list_draw_keys (ChannelDrawList *channel_list, View2D *v2d)
 
static void channel_list_draw (ChannelDrawList *channel_list, View2D *v2d)
 
void ED_channel_list_flush (ChannelDrawList *channel_list, View2D *v2d)
 
void ED_channel_list_free (ChannelDrawList *channel_list)
 
static ChannelListElementchannel_list_add_element (ChannelDrawList *channel_list, ChannelType elem_type, float ypos, float yscale_fac, eSAction_Flag saction_flag)
 
void ED_add_summary_channel (ChannelDrawList *channel_list, bAnimContext *ac, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_scene_channel (ChannelDrawList *channel_list, bDopeSheet *ads, Scene *sce, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_object_channel (ChannelDrawList *channel_list, bDopeSheet *ads, Object *ob, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_fcurve_channel (ChannelDrawList *channel_list, AnimData *adt, FCurve *fcu, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_action_group_channel (ChannelDrawList *channel_list, AnimData *adt, bActionGroup *agrp, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_action_layered_channel (ChannelDrawList *channel_list, AnimData *adt, bAction *action, const float ypos, const float yscale_fac, int saction_flag)
 
void ED_add_action_slot_channel (ChannelDrawList *channel_list, AnimData *adt, animrig::Action &action, animrig::Slot &slot, const float ypos, const float yscale_fac, int saction_flag)
 
void ED_add_action_channel (ChannelDrawList *channel_list, AnimData *adt, bAction *act, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_grease_pencil_datablock_channel (ChannelDrawList *channel_list, bAnimContext *ac, AnimData *adt, const GreasePencil *grease_pencil, const float ypos, const float yscale_fac, int saction_flag)
 
void ED_add_grease_pencil_cels_channel (ChannelDrawList *channel_list, bDopeSheet *ads, const GreasePencilLayer *layer, const float ypos, const float yscale_fac, int saction_flag)
 
void ED_add_grease_pencil_layer_group_channel (ChannelDrawList *channel_list, bDopeSheet *ads, const GreasePencilLayerTreeGroup *layer_group, const float ypos, const float yscale_fac, int saction_flag)
 
void ED_add_grease_pencil_layer_legacy_channel (ChannelDrawList *channel_list, bDopeSheet *ads, bGPDlayer *gpl, float ypos, float yscale_fac, int saction_flag)
 
void ED_add_mask_layer_channel (ChannelDrawList *channel_list, bDopeSheet *ads, MaskLayer *masklay, float ypos, float yscale_fac, int saction_flag)
 

Enumeration Type Documentation

◆ ChannelType

enum class ChannelType
strong
Enumerator
SUMMARY 
SCENE 
OBJECT 
FCURVE 
ACTION_LAYERED 
ACTION_SLOT 
ACTION_LEGACY 
ACTION_GROUP 
GREASE_PENCIL_CELS 
GREASE_PENCIL_GROUP 
GREASE_PENCIL_DATA 
GREASE_PENCIL_LAYER 
MASK_LAYER 

Definition at line 387 of file keyframes_draw.cc.

Function Documentation

◆ build_channel_keylist()

◆ channel_list_add_element()

◆ channel_list_build_keylists()

static void channel_list_build_keylists ( ChannelDrawList * channel_list,
blender::float2 range )
static

◆ channel_list_draw()

static void channel_list_draw ( ChannelDrawList * channel_list,
View2D * v2d )
static

Definition at line 618 of file keyframes_draw.cc.

References channel_list_draw_blocks(), and channel_list_draw_keys().

Referenced by ED_channel_list_flush().

◆ channel_list_draw_blocks()

static void channel_list_draw_blocks ( ChannelDrawList * channel_list,
View2D * v2d )
static

Definition at line 546 of file keyframes_draw.cc.

References ChannelDrawList::channels, draw_channel_blocks(), and LISTBASE_FOREACH.

Referenced by channel_list_draw().

◆ channel_list_draw_keys()

◆ channel_list_visible_key_len()

static int channel_list_visible_key_len ( const ChannelDrawList * channel_list,
const View2D * v2d )
static

◆ channel_ui_data_init()

◆ channel_visible_key_len()

static int channel_visible_key_len ( const View2D * v2d,
const ListBase * keys )
static

Definition at line 553 of file keyframes_draw.cc.

References draw_keylist_is_visible_key(), len, and LISTBASE_FOREACH.

Referenced by channel_list_visible_key_len().

◆ draw_channel_blocks()

◆ draw_channel_keys()

◆ draw_keyframe_shape()

void draw_keyframe_shape ( const float x,
const float y,
float size,
const bool sel,
const eBezTriple_KeyframeType key_type,
const eKeyframeShapeDrawOpts mode,
const float alpha,
const KeyframeShaderBindings * sh_bindings,
const short handle_type,
const short extreme_type )

◆ draw_keylist_block()

◆ draw_keylist_block_gpencil()

◆ draw_keylist_block_interpolation_line()

◆ draw_keylist_block_moving_hold()

◆ draw_keylist_block_standard()

◆ draw_keylist_blocks()

static void draw_keylist_blocks ( const DrawKeylistUIData * ctx,
const ActKeyColumn * keys,
const int key_len,
float ypos )
static

Definition at line 336 of file keyframes_draw.cc.

References draw_keylist_block().

Referenced by draw_channel_blocks().

◆ draw_keylist_is_visible_key()

static bool draw_keylist_is_visible_key ( const View2D * v2d,
const ActKeyColumn * ak )
static

◆ draw_keylist_keys()

◆ ED_add_action_channel()

void ED_add_action_channel ( ChannelDrawList * channel_list,
AnimData * adt,
bAction * act,
float ypos,
float yscale_fac,
int saction_flag )

◆ ED_add_action_group_channel()

◆ ED_add_action_layered_channel()

void ED_add_action_layered_channel ( ChannelDrawList * channel_list,
AnimData * adt,
bAction * action,
const float ypos,
const float yscale_fac,
int saction_flag )

◆ ED_add_action_slot_channel()

void ED_add_action_slot_channel ( ChannelDrawList * channel_list,
AnimData * adt,
animrig::Action & action,
animrig::Slot & slot,
const float ypos,
const float yscale_fac,
int saction_flag )

◆ ED_add_fcurve_channel()

◆ ED_add_grease_pencil_cels_channel()

void ED_add_grease_pencil_cels_channel ( ChannelDrawList * channel_list,
bDopeSheet * ads,
const GreasePencilLayer * layer,
const float ypos,
const float yscale_fac,
int saction_flag )

◆ ED_add_grease_pencil_datablock_channel()

void ED_add_grease_pencil_datablock_channel ( ChannelDrawList * channel_list,
bAnimContext * ac,
AnimData * adt,
const GreasePencil * grease_pencil,
const float ypos,
const float yscale_fac,
int saction_flag )

◆ ED_add_grease_pencil_layer_group_channel()

void ED_add_grease_pencil_layer_group_channel ( ChannelDrawList * channel_list,
bDopeSheet * ads,
const GreasePencilLayerTreeGroup * layer_group,
const float ypos,
const float yscale_fac,
int saction_flag )

◆ ED_add_grease_pencil_layer_legacy_channel()

void ED_add_grease_pencil_layer_legacy_channel ( ChannelDrawList * channel_list,
bDopeSheet * ads,
bGPDlayer * gpl,
float ypos,
float yscale_fac,
int saction_flag )

◆ ED_add_mask_layer_channel()

void ED_add_mask_layer_channel ( ChannelDrawList * channel_list,
bDopeSheet * ads,
MaskLayer * masklay,
float ypos,
float yscale_fac,
int saction_flag )

◆ ED_add_object_channel()

void ED_add_object_channel ( ChannelDrawList * channel_list,
bDopeSheet * ads,
Object * ob,
float ypos,
float yscale_fac,
int saction_flag )

◆ ED_add_scene_channel()

void ED_add_scene_channel ( ChannelDrawList * channel_list,
bDopeSheet * ads,
Scene * sce,
float ypos,
float yscale_fac,
int saction_flag )

◆ ED_add_summary_channel()

void ED_add_summary_channel ( ChannelDrawList * channel_list,
bAnimContext * ac,
float ypos,
float yscale_fac,
int saction_flag )

Definition at line 658 of file keyframes_draw.cc.

References ChannelListElement::ac, channel_list_add_element(), and SUMMARY.

Referenced by draw_keyframes().

◆ ED_channel_draw_list_create()

ChannelDrawList * ED_channel_draw_list_create ( )

Definition at line 533 of file keyframes_draw.cc.

References MEM_callocN.

Referenced by draw_keyframes().

◆ ED_channel_list_flush()

void ED_channel_list_flush ( ChannelDrawList * channel_list,
View2D * v2d )

◆ ED_channel_list_free()

void ED_channel_list_free ( ChannelDrawList * channel_list)

◆ prepare_channel_for_drawing()

static void prepare_channel_for_drawing ( ChannelListElement * elem)
static