53 const short handle_type,
54 const short extreme_type)
117 fill_col[3] = 255.0f * alpha;
121 outline_col[0] = fill_col[0];
122 outline_col[1] = fill_col[1];
123 outline_col[2] = fill_col[2];
124 outline_col[3] = fill_col[3];
131 outline_col[3] *= alpha;
135 fill_col[0] = outline_col[0];
136 fill_col[1] = outline_col[1];
137 fill_col[2] = outline_col[2];
142 switch (handle_type) {
208 ctx->
alpha = channel_locked ? 0.25f : 1.0f;
210 ctx->
icon_size =
U.widget_unit * 0.5f * yscale_fac;
319 if (valid_hold != 0) {
343 for (
int i = 0;
i < key_len;
i++) {
364 for (
int i = 0;
i < key_len;
i++) {
440 switch (elem->
type) {
611 if (visible_key_len == 0) {
621 format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
623 format,
"size", blender::gpu::VertAttrType::SFLOAT_32);
625 format,
"color", blender::gpu::VertAttrType::UNORM_8_8_8_8);
627 format,
"outlineColor", blender::gpu::VertAttrType::UNORM_8_8_8_8);
629 format,
"flags", blender::gpu::VertAttrType::UINT_32);
677 draw_elem->
type = elem_type;
679 draw_elem->
ypos = ypos;
709 draw_elem->
ads = ads;
710 draw_elem->
sce = sce;
723 draw_elem->
ads = ads;
743 draw_elem->
adt = ale->
adt;
744 draw_elem->
fcu = fcu;
763 draw_elem->
adt = ale->
adt;
764 draw_elem->
agrp = agrp;
773 const float yscale_fac,
777 BLI_assert(action->wrap().is_action_layered());
786 draw_elem->
adt = ale->
adt;
787 draw_elem->
act = action;
797 const float yscale_fac,
807 draw_elem->
adt = ale->
adt;
808 draw_elem->
act = &action;
820 BLI_assert(!act || act->wrap().is_action_legacy());
828 draw_elem->
adt = ale->
adt;
829 draw_elem->
act = act;
838 const float yscale_fac,
849 draw_elem->
adt = ale->
adt;
859 const float yscale_fac,
867 draw_elem->
ads = ads;
876 const float yscale_fac,
884 draw_elem->
ads = ads;
902 draw_elem->
ads = ads;
903 draw_elem->
gpl = gpl;
917 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(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(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(GPUBlend 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)
bool ANIM_nla_mapping_allowed(const bAnimListElem *ale)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
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)
void ED_add_fcurve_channel(ChannelDrawList *channel_list, bAnimListElem *ale, FCurve *fcu, float ypos, float yscale_fac, int 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_action_channel(ChannelDrawList *channel_list, bAnimListElem *ale, bAction *act, float ypos, 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_action_group_channel(ChannelDrawList *channel_list, bAnimListElem *ale, bActionGroup *agrp, float ypos, 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_datablock_channel(ChannelDrawList *channel_list, bAnimContext *ac, bAnimListElem *ale, const GreasePencil *grease_pencil, 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)
static void draw_channel_keys(ChannelListElement *elem, View2D *v2d, const KeyframeShaderBindings *sh_bindings)
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)
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)
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)
void ED_add_action_slot_channel(ChannelDrawList *channel_list, bAnimContext *ac, bAnimListElem *ale, animrig::Action &action, animrig::Slot &slot, const float ypos, const 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)
void ED_add_action_layered_channel(ChannelDrawList *channel_list, bAnimContext *ac, bAnimListElem *ale, bAction *action, const float ypos, const float yscale_fac, int saction_flag)
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 mask_to_keylist(bDopeSheet *, MaskLayer *masklay, AnimKeylist *keylist)
bool actkeyblock_is_valid(const ActKeyColumn *ac)
void action_slot_summary_to_keylist(bAnimContext *ac, ID *animated_id, animrig::Action &action, const animrig::slot_handle_t slot_handle, AnimKeylist *keylist, const int saction_flag, blender::float2 range)
void fcurve_to_keylist(AnimData *adt, FCurve *fcu, AnimKeylist *keylist, const int saction_flag, blender::float2 range, const bool use_nla_remapping)
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)
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_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
VecBase< float, 2 > float2
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