Blender  V2.93
Classes | Typedefs | Functions | Variables
keyframes_draw.c File Reference
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_dlrbTree.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_brush_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_mask_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_fcurve.h"
#include "GPU_immediate.h"
#include "GPU_state.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"
#include "ED_keyframes_draw.h"

Go to the source code of this file.

Classes

struct  BezTripleChain
 

Typedefs

typedef struct BezTripleChain BezTripleChain
 

Functions

BLI_INLINE bool is_cfra_eq (float a, float b)
 
BLI_INLINE bool is_cfra_lt (float a, float b)
 
short compare_ak_cfraPtr (void *node, void *data)
 
static eKeyframeHandleDrawOpts bezt_handle_type (BezTriple *bezt)
 
static eKeyframeExtremeDrawOpts bezt_extreme_type (BezTripleChain *chain)
 
static short compare_ak_bezt (void *node, void *data)
 
static DLRBT_Nodenalloc_ak_bezt (void *data)
 
static void nupdate_ak_bezt (void *node, void *data)
 
static short compare_ak_gpframe (void *node, void *data)
 
static DLRBT_Nodenalloc_ak_gpframe (void *data)
 
static void nupdate_ak_gpframe (void *node, void *data)
 
static short compare_ak_masklayshape (void *node, void *data)
 
static DLRBT_Nodenalloc_ak_masklayshape (void *data)
 
static void nupdate_ak_masklayshape (void *node, void *data)
 
static void add_bezt_to_keycolumns_list (DLRBT_Tree *keys, BezTripleChain *bezt)
 
static void add_gpframe_to_keycolumns_list (DLRBT_Tree *keys, bGPDframe *gpf)
 
static void add_masklay_to_keycolumns_list (DLRBT_Tree *keys, MaskLayerShape *masklay_shape)
 
static void compute_keyblock_data (ActKeyBlockInfo *info, BezTriple *prev, BezTriple *beztn)
 
static void add_keyblock_info (ActKeyColumn *col, const ActKeyBlockInfo *block)
 
static void add_bezt_to_keyblocks_list (DLRBT_Tree *keys, BezTriple *bezt, int bezt_len)
 
static void update_keyblocks (DLRBT_Tree *keys, BezTriple *bezt, int bezt_len)
 
bool actkeyblock_is_valid (ActKeyColumn *ac)
 
int actkeyblock_get_valid_hold (ActKeyColumn *ac)
 
void draw_keyframe_shape (float x, float y, float size, bool sel, short key_type, short mode, float alpha, uint pos_id, uint size_id, uint color_id, uint outline_color_id, uint flags_id, short handle_type, short extreme_type)
 
static void draw_keylist (View2D *v2d, DLRBT_Tree *keys, float ypos, float yscale_fac, bool channelLocked, int saction_flag)
 
void draw_summary_channel (View2D *v2d, bAnimContext *ac, float ypos, float yscale_fac, int saction_flag)
 
void draw_scene_channel (View2D *v2d, bDopeSheet *ads, Scene *sce, float ypos, float yscale_fac, int saction_flag)
 
void draw_object_channel (View2D *v2d, bDopeSheet *ads, Object *ob, float ypos, float yscale_fac, int saction_flag)
 
void draw_fcurve_channel (View2D *v2d, AnimData *adt, FCurve *fcu, float ypos, float yscale_fac, int saction_flag)
 
void draw_agroup_channel (View2D *v2d, AnimData *adt, bActionGroup *agrp, float ypos, float yscale_fac, int saction_flag)
 
void draw_action_channel (View2D *v2d, AnimData *adt, bAction *act, float ypos, float yscale_fac, int saction_flag)
 
void draw_gpencil_channel (View2D *v2d, bDopeSheet *ads, bGPdata *gpd, float ypos, float yscale_fac, int saction_flag)
 
void draw_gpl_channel (View2D *v2d, bDopeSheet *ads, bGPDlayer *gpl, float ypos, float yscale_fac, int saction_flag)
 
void draw_masklay_channel (View2D *v2d, bDopeSheet *ads, MaskLayer *masklay, float ypos, float yscale_fac, int saction_flag)
 
void summary_to_keylist (bAnimContext *ac, DLRBT_Tree *keys, int saction_flag)
 
void scene_to_keylist (bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, int saction_flag)
 
void ob_to_keylist (bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, int saction_flag)
 
void cachefile_to_keylist (bDopeSheet *ads, CacheFile *cache_file, DLRBT_Tree *keys, int saction_flag)
 
void fcurve_to_keylist (AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, int saction_flag)
 
void agroup_to_keylist (AnimData *adt, bActionGroup *agrp, DLRBT_Tree *keys, int saction_flag)
 
void action_to_keylist (AnimData *adt, bAction *act, DLRBT_Tree *keys, int saction_flag)
 
void gpencil_to_keylist (bDopeSheet *ads, bGPdata *gpd, DLRBT_Tree *keys, const bool active)
 
void gpl_to_keylist (bDopeSheet *UNUSED(ads), bGPDlayer *gpl, DLRBT_Tree *keys)
 
void mask_to_keylist (bDopeSheet *UNUSED(ads), MaskLayer *masklay, DLRBT_Tree *keys)
 

Variables

static const ActKeyBlockInfo dummy_keyblock = {0}
 

Typedef Documentation

◆ BezTripleChain

Function Documentation

◆ action_to_keylist()

void action_to_keylist ( AnimData adt,
bAction act,
DLRBT_Tree keys,
int  saction_flag 
)

◆ actkeyblock_get_valid_hold()

int actkeyblock_get_valid_hold ( ActKeyColumn ac)

◆ actkeyblock_is_valid()

bool actkeyblock_is_valid ( ActKeyColumn ac)

Definition at line 534 of file keyframes_draw.c.

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

Referenced by actkeyblock_get_valid_hold(), and draw_keylist().

◆ add_bezt_to_keyblocks_list()

static void add_bezt_to_keyblocks_list ( DLRBT_Tree keys,
BezTriple bezt,
int  bezt_len 
)
static

◆ add_bezt_to_keycolumns_list()

static void add_bezt_to_keycolumns_list ( DLRBT_Tree keys,
BezTripleChain bezt 
)
static

◆ add_gpframe_to_keycolumns_list()

static void add_gpframe_to_keycolumns_list ( DLRBT_Tree keys,
bGPDframe gpf 
)
static

◆ add_keyblock_info()

static void add_keyblock_info ( ActKeyColumn col,
const ActKeyBlockInfo block 
)
static

Definition at line 418 of file keyframes_draw.c.

References col, ActKeyBlockInfo::flag, and ActKeyBlockInfo::sel.

Referenced by add_bezt_to_keyblocks_list().

◆ add_masklay_to_keycolumns_list()

static void add_masklay_to_keycolumns_list ( DLRBT_Tree keys,
MaskLayerShape masklay_shape 
)
static

◆ agroup_to_keylist()

void agroup_to_keylist ( AnimData adt,
bActionGroup agrp,
DLRBT_Tree keys,
int  saction_flag 
)

◆ bezt_extreme_type()

static eKeyframeExtremeDrawOpts bezt_extreme_type ( BezTripleChain chain)
static

◆ bezt_handle_type()

static eKeyframeHandleDrawOpts bezt_handle_type ( BezTriple bezt)
static

◆ cachefile_to_keylist()

void cachefile_to_keylist ( bDopeSheet ads,
CacheFile cache_file,
DLRBT_Tree keys,
int  saction_flag 
)

◆ compare_ak_bezt()

static short compare_ak_bezt ( void *  node,
void *  data 
)
static

◆ compare_ak_cfraPtr()

short compare_ak_cfraPtr ( void *  node,
void *  data 
)

◆ compare_ak_gpframe()

static short compare_ak_gpframe ( void *  node,
void *  data 
)
static

Definition at line 241 of file keyframes_draw.c.

References compare_ak_cfraPtr(), data, bGPDframe::framenum, and node.

Referenced by add_gpframe_to_keycolumns_list().

◆ compare_ak_masklayshape()

static short compare_ak_masklayshape ( void *  node,
void *  data 
)
static

Definition at line 294 of file keyframes_draw.c.

References compare_ak_cfraPtr(), data, MaskLayerShape::frame, and node.

Referenced by add_masklay_to_keycolumns_list().

◆ compute_keyblock_data()

static void compute_keyblock_data ( ActKeyBlockInfo info,
BezTriple prev,
BezTriple beztn 
)
static

◆ draw_action_channel()

void draw_action_channel ( View2D v2d,
AnimData adt,
bAction act,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_agroup_channel()

void draw_agroup_channel ( View2D v2d,
AnimData adt,
bActionGroup agrp,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_fcurve_channel()

void draw_fcurve_channel ( View2D v2d,
AnimData adt,
FCurve fcu,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_gpencil_channel()

void draw_gpencil_channel ( View2D v2d,
bDopeSheet ads,
bGPdata gpd,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_gpl_channel()

void draw_gpl_channel ( View2D v2d,
bDopeSheet ads,
bGPDlayer gpl,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_keyframe_shape()

void draw_keyframe_shape ( float  x,
float  y,
float  size,
bool  sel,
short  key_type,
short  mode,
float  alpha,
uint  pos_id,
uint  size_id,
uint  color_id,
uint  outline_color_id,
uint  flags_id,
short  handle_type,
short  extreme_type 
)

◆ draw_keylist()

static void draw_keylist ( View2D v2d,
DLRBT_Tree keys,
float  ypos,
float  yscale_fac,
bool  channelLocked,
int  saction_flag 
)
static

◆ draw_masklay_channel()

void draw_masklay_channel ( View2D v2d,
bDopeSheet ads,
MaskLayer masklay,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_object_channel()

void draw_object_channel ( View2D v2d,
bDopeSheet ads,
Object ob,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_scene_channel()

void draw_scene_channel ( View2D v2d,
bDopeSheet ads,
Scene sce,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ draw_summary_channel()

void draw_summary_channel ( View2D v2d,
bAnimContext ac,
float  ypos,
float  yscale_fac,
int  saction_flag 
)

◆ fcurve_to_keylist()

void fcurve_to_keylist ( AnimData adt,
FCurve fcu,
DLRBT_Tree keys,
int  saction_flag 
)

◆ gpencil_to_keylist()

void gpencil_to_keylist ( bDopeSheet ads,
bGPdata gpd,
DLRBT_Tree keys,
const bool  active 
)

◆ gpl_to_keylist()

void gpl_to_keylist ( bDopeSheet UNUSEDads,
bGPDlayer gpl,
DLRBT_Tree keys 
)

◆ is_cfra_eq()

BLI_INLINE bool is_cfra_eq ( float  a,
float  b 
)

Definition at line 63 of file keyframes_draw.c.

References Freestyle::a, BEZT_BINARYSEARCH_THRESH, and IS_EQT.

Referenced by add_bezt_to_keyblocks_list(), and compare_ak_cfraPtr().

◆ is_cfra_lt()

BLI_INLINE bool is_cfra_lt ( float  a,
float  b 
)

Definition at line 68 of file keyframes_draw.c.

References Freestyle::a, and BEZT_BINARYSEARCH_THRESH.

Referenced by add_bezt_to_keyblocks_list().

◆ mask_to_keylist()

void mask_to_keylist ( bDopeSheet UNUSEDads,
MaskLayer masklay,
DLRBT_Tree keys 
)

◆ nalloc_ak_bezt()

static DLRBT_Node* nalloc_ak_bezt ( void *  data)
static

◆ nalloc_ak_gpframe()

static DLRBT_Node* nalloc_ak_gpframe ( void *  data)
static

◆ nalloc_ak_masklayshape()

static DLRBT_Node* nalloc_ak_masklayshape ( void *  data)
static

◆ nupdate_ak_bezt()

static void nupdate_ak_bezt ( void *  node,
void *  data 
)
static

◆ nupdate_ak_gpframe()

static void nupdate_ak_gpframe ( void *  node,
void *  data 
)
static

◆ nupdate_ak_masklayshape()

static void nupdate_ak_masklayshape ( void *  node,
void *  data 
)
static

◆ ob_to_keylist()

void ob_to_keylist ( bDopeSheet ads,
Object ob,
DLRBT_Tree keys,
int  saction_flag 
)

◆ scene_to_keylist()

void scene_to_keylist ( bDopeSheet ads,
Scene sce,
DLRBT_Tree keys,
int  saction_flag 
)

◆ summary_to_keylist()

void summary_to_keylist ( bAnimContext ac,
DLRBT_Tree keys,
int  saction_flag 
)

◆ update_keyblocks()

static void update_keyblocks ( DLRBT_Tree keys,
BezTriple bezt,
int  bezt_len 
)
static

Variable Documentation

◆ dummy_keyblock

const ActKeyBlockInfo dummy_keyblock = {0}
static

Definition at line 371 of file keyframes_draw.c.

Referenced by add_bezt_to_keyblocks_list().