51 const short handle_type,
52 const short extreme_type)
115 fill_col[3] = 255.0f * alpha;
119 outline_col[0] = fill_col[0];
120 outline_col[1] = fill_col[1];
121 outline_col[2] = fill_col[2];
122 outline_col[3] = fill_col[3];
129 outline_col[3] *= alpha;
133 fill_col[0] = outline_col[0];
134 fill_col[1] = outline_col[1];
135 fill_col[2] = outline_col[2];
140 switch (handle_type) {
206 ctx->
alpha = channel_locked ? 0.25f : 1.0f;
208 ctx->
icon_size =
U.widget_unit * 0.5f * yscale_fac;
317 if (valid_hold != 0) {
341 for (
int i = 0; i < key_len; i++) {
362 for (
int i = 0; i < key_len; i++) {
432 switch (elem->
type) {
584 if (visible_key_len == 0) {
648 draw_elem->
type = elem_type;
650 draw_elem->
ypos = ypos;
664 saction_flag &= ~SACTION_SHOW_EXTREMES;
677 saction_flag &= ~SACTION_SHOW_EXTREMES;
680 draw_elem->
ads = ads;
681 draw_elem->
sce = sce;
691 saction_flag &= ~SACTION_SHOW_EXTREMES;
694 draw_elem->
ads = ads;
712 draw_elem->
adt = adt;
713 draw_elem->
fcu = fcu;
730 draw_elem->
adt = adt;
731 draw_elem->
agrp = agrp;
739 const float yscale_fac,
743 BLI_assert(action->wrap().is_action_layered());
746 saction_flag &= ~SACTION_SHOW_EXTREMES;
750 draw_elem->
adt = adt;
751 draw_elem->
act = action;
760 const float yscale_fac,
764 saction_flag &= ~SACTION_SHOW_EXTREMES;
768 draw_elem->
adt = adt;
769 draw_elem->
act = &action;
781#ifdef WITH_ANIM_BAKLAVA
782 BLI_assert(!act || act->wrap().is_action_legacy());
786 saction_flag &= ~SACTION_SHOW_EXTREMES;
790 draw_elem->
adt = adt;
791 draw_elem->
act = act;
800 const float yscale_fac,
810 draw_elem->
adt = adt;
811 draw_elem->
act = adt ? adt->
action :
nullptr;
820 const float yscale_fac,
828 draw_elem->
ads = ads;
837 const float yscale_fac,
845 draw_elem->
ads = ads;
863 draw_elem->
ads = ads;
864 draw_elem->
gpl = gpl;
878 draw_elem->
ads = ads;
Functions and classes to work with Actions.
Low-level operations for grease pencil.
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE float min_ff(float a, float b)
MINLINE void copy_v4_v4(float r[4], const float a[4])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
#define IN_RANGE_INCL(a, b, c)
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ SACTION_SHOW_INTERPOLATION
@ ACTKEYBLOCK_FLAG_GPENCIL
@ ACTKEYBLOCK_FLAG_NON_BEZIER
@ ACTKEYBLOCK_FLAG_STATIC_HOLD
@ KEYFRAME_HANDLE_AUTO_CLAMP
@ KEYFRAME_HANDLE_ALIGNED
@ GPU_SHADER_KEYFRAME_SHAPE
@ GPU_KEYFRAME_SHAPE_INNER_DOT
@ GPU_KEYFRAME_SHAPE_CIRCLE
@ GPU_KEYFRAME_SHAPE_SQUARE
@ GPU_KEYFRAME_SHAPE_ARROW_END_MIXED
@ GPU_KEYFRAME_SHAPE_DIAMOND
@ GPU_KEYFRAME_SHAPE_ARROW_END_MAX
@ GPU_KEYFRAME_SHAPE_ARROW_END_MIN
@ GPU_KEYFRAME_SHAPE_CLIPPED_VERTICAL
void GPU_program_point_size(bool enable)
void GPU_blend(eGPUBlend blend)
Read Guarded memory(de)allocation.
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void UI_draw_roundbox_corner_set(int type)
@ TH_KEYTYPE_KEYFRAME_SELECT
@ TH_KEYTYPE_BREAKDOWN_SELECT
@ TH_KEYTYPE_EXTREME_SELECT
@ TH_KEYTYPE_MOVEHOLD_SELECT
@ TH_KEYTYPE_JITTER_SELECT
@ TH_KEYTYPE_GENERATED_SELECT
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
float UI_view2d_scale_get_x(const View2D *v2d)
draw_view in_light_buf[] float
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)
static void draw_keylist_block_standard(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
static void channel_ui_data_init(DrawKeylistUIData *ctx, View2D *v2d, float yscale_fac, bool channel_locked, eSAction_Flag saction_flag)
static void prepare_channel_for_drawing(ChannelListElement *elem)
void ED_add_grease_pencil_layer_legacy_channel(ChannelDrawList *channel_list, bDopeSheet *ads, bGPDlayer *gpl, float ypos, float yscale_fac, int saction_flag)
static void draw_keylist_block_gpencil(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
ChannelDrawList * ED_channel_draw_list_create()
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)
static void channel_list_draw_blocks(ChannelDrawList *channel_list, View2D *v2d)
void ED_add_scene_channel(ChannelDrawList *channel_list, bDopeSheet *ads, Scene *sce, float ypos, float yscale_fac, int saction_flag)
void ED_channel_list_flush(ChannelDrawList *channel_list, View2D *v2d)
static int channel_list_visible_key_len(const ChannelDrawList *channel_list, const View2D *v2d)
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)
static void draw_channel_keys(ChannelListElement *elem, View2D *v2d, const KeyframeShaderBindings *sh_bindings)
void ED_add_action_channel(ChannelDrawList *channel_list, AnimData *adt, bAction *act, float ypos, float yscale_fac, int saction_flag)
static void channel_list_build_keylists(ChannelDrawList *channel_list, blender::float2 range)
static void draw_keylist_block_interpolation_line(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
static void draw_channel_blocks(ChannelListElement *elem, View2D *v2d)
void ED_add_action_layered_channel(ChannelDrawList *channel_list, AnimData *adt, bAction *action, const float ypos, const float yscale_fac, int saction_flag)
static void draw_keylist_block(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
static void channel_list_draw_keys(ChannelDrawList *channel_list, View2D *v2d)
static void channel_list_draw(ChannelDrawList *channel_list, View2D *v2d)
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)
void ED_channel_list_free(ChannelDrawList *channel_list)
static void draw_keylist_block_moving_hold(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
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)
static bool draw_keylist_is_visible_key(const View2D *v2d, const ActKeyColumn *ak)
void ED_add_mask_layer_channel(ChannelDrawList *channel_list, bDopeSheet *ads, MaskLayer *masklay, float ypos, float yscale_fac, int saction_flag)
void ED_add_summary_channel(ChannelDrawList *channel_list, bAnimContext *ac, float ypos, float yscale_fac, int saction_flag)
static ChannelListElement * channel_list_add_element(ChannelDrawList *channel_list, ChannelType elem_type, float ypos, float yscale_fac, eSAction_Flag saction_flag)
void ED_add_object_channel(ChannelDrawList *channel_list, bDopeSheet *ads, Object *ob, float ypos, float yscale_fac, int saction_flag)
static int channel_visible_key_len(const View2D *v2d, const ListBase *keys)
static void build_channel_keylist(ChannelListElement *elem, blender::float2 range)
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 draw_keylist_blocks(const DrawKeylistUIData *ctx, const ActKeyColumn *keys, const int key_len, float ypos)
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 mask_to_keylist(bDopeSheet *, MaskLayer *masklay, AnimKeylist *keylist)
bool actkeyblock_is_valid(const ActKeyColumn *ac)
void scene_to_keylist(bDopeSheet *ads, Scene *sce, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
void ob_to_keylist(bDopeSheet *ads, Object *ob, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
void grease_pencil_data_block_to_keylist(AnimData *adt, const GreasePencil *grease_pencil, AnimKeylist *keylist, const int saction_flag, const bool active_layer_only)
void ED_keylist_prepare_for_direct_access(AnimKeylist *keylist)
void summary_to_keylist(bAnimContext *ac, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
AnimKeylist * ED_keylist_create()
int actkeyblock_get_valid_hold(const ActKeyColumn *ac)
void ED_keylist_free(AnimKeylist *keylist)
void fcurve_to_keylist(AnimData *adt, FCurve *fcu, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
void action_slot_to_keylist(AnimData *adt, animrig::Action &action, const animrig::slot_handle_t slot_handle, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
int64_t ED_keylist_array_len(const AnimKeylist *keylist)
const ListBase * ED_keylist_listbase(const AnimKeylist *keylist)
void grease_pencil_layer_group_to_keylist(AnimData *adt, const GreasePencilLayerTreeGroup *layer_group, AnimKeylist *keylist, const int saction_flag)
void action_to_keylist(AnimData *adt, bAction *dna_action, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
void grease_pencil_cels_to_keylist(AnimData *, const GreasePencilLayer *gpl, AnimKeylist *keylist, int)
void gpl_to_keylist(bDopeSheet *, bGPDlayer *gpl, AnimKeylist *keylist)
void action_group_to_keylist(AnimData *adt, bActionGroup *agrp, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
const ActKeyColumn * ED_keylist_array(const AnimKeylist *keylist)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
eBezTriple_KeyframeType key_type
const GreasePencilLayer * grease_pencil_layer
ChannelListElement * prev
const GreasePencilLayerTreeGroup * grease_pencil_layer_group
animrig::Slot * action_slot
ChannelListElement * next
const GreasePencil * grease_pencil
eSAction_Flag saction_flag