53 const short handle_type,
54 const short extreme_type)
121 fill_col[3] = 255.0f * alpha;
125 outline_col[0] = fill_col[0];
126 outline_col[1] = fill_col[1];
127 outline_col[2] = fill_col[2];
128 outline_col[3] = fill_col[3];
135 outline_col[3] *= alpha;
139 fill_col[0] = outline_col[0];
140 fill_col[1] = outline_col[1];
141 fill_col[2] = outline_col[2];
146 switch (handle_type) {
215 ctx->
alpha = channel_locked ? 0.25f : 1.0f;
217 ctx->
icon_size =
U.widget_unit * 0.5f * yscale_fac;
294 const int height = int(0.45f * (ctx->
icon_size)) * 2 - 1;
298 box.
ymin =
round(ypos - (
float(height) * 0.5f));
315 const float *
color =
nullptr;
351 if (valid_hold != 0) {
373 for (
int i = 0; i < key_len; i++) {
394 for (
int i = 0; i < key_len; i++) {
470 switch (elem->
type) {
641 if (visible_key_len == 0) {
653 format,
"color", gpu::VertAttrType::UNORM_8_8_8_8);
655 format,
"outlineColor", gpu::VertAttrType::UNORM_8_8_8_8);
692 channel_list->
channels.free_no_destruct();
693 MEM_delete(channel_list);
704 draw_elem->
type = elem_type;
706 draw_elem->
ypos = ypos;
736 draw_elem->
ads = ads;
737 draw_elem->
sce = sce;
750 draw_elem->
ads = ads;
770 draw_elem->
adt = ale->
adt;
771 draw_elem->
fcu = fcu;
790 draw_elem->
adt = ale->
adt;
791 draw_elem->
agrp = agrp;
800 const float yscale_fac,
812 draw_elem->
adt = ale->
adt;
813 draw_elem->
act = action;
823 const float yscale_fac,
833 draw_elem->
adt = ale->
adt;
834 draw_elem->
act = &action;
844 const float yscale_fac,
855 draw_elem->
adt = ale->
adt;
865 const float yscale_fac,
873 draw_elem->
ads = ads;
882 const float yscale_fac,
890 draw_elem->
ads = ads;
908 draw_elem->
ads = ads;
909 draw_elem->
gpl = gpl;
923 draw_elem->
ads = ads;
Functions and classes to work with Actions.
Low-level operations for grease pencil.
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ 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
Read Blender memory allocation and freeing.
#define IN_RANGE_INCL(a, b, c)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
void get_color_4ubv(int colorid, unsigned char col[4])
void get_color_4fv(int colorid, float col[4])
void get_color_3ubv(int colorid, unsigned char col[3])
void draw_roundbox_corner_set(int type)
float view2d_scale_get_x(const View2D *v2d)
void draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
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)
MINLINE float min_ff(float a, float b)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void action_to_keylist(AnimData *adt, bAction *dna_action, AnimKeylist *keylist, const int saction_flag, float2 range)
void grease_pencil_cels_to_keylist(AnimData *, const GreasePencilLayer *gpl, AnimKeylist *keylist, int)
static bool draw_keylist_is_visible_key(const View2D *v2d, const ActKeyColumn *ak)
void gpl_to_keylist(bDopeSheet *, bGPDlayer *gpl, AnimKeylist *keylist)
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)
bool actkeyblock_is_valid(const ActKeyColumn *ac)
ChannelDrawList * ED_channel_draw_list_create()
void grease_pencil_layer_group_to_keylist(AnimData *adt, const GreasePencilLayerTreeGroup *layer_group, AnimKeylist *keylist, const int saction_flag)
void immAttr4ubv(uint attr_id, const unsigned char data[4])
static void draw_keylist_block_standard(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
static void build_channel_keylist(ChannelListElement *elem, float2 range)
static void draw_keylist_block_moving_hold(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
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 immUniform2f(const char *name, float x, float y)
GPUVertFormat * immVertexFormat()
void immBegin(GPUPrimType, uint vertex_len)
void summary_to_keylist(bAnimContext *ac, AnimKeylist *keylist, const int saction_flag, float2 range)
static void draw_channel_blocks(ChannelListElement *elem, View2D *v2d)
@ TH_KEYTYPE_BREAKDOWN_SELECT
@ TH_KEYTYPE_JITTER_SELECT
@ TH_KEYTYPE_MOVEHOLD_SELECT
@ TH_KEYTYPE_KEYFRAME_SELECT
@ TH_KEYTYPE_EXTREME_SELECT
@ TH_KEYTYPE_GENERATED_SELECT
bool ANIM_nla_mapping_allowed(const bAnimListElem *ale)
void ED_add_mask_layer_channel(ChannelDrawList *channel_list, bDopeSheet *ads, MaskLayer *masklay, float ypos, float yscale_fac, int saction_flag)
const ActKeyColumn * ED_keylist_array(const AnimKeylist *keylist)
static void channel_list_draw_blocks(ChannelDrawList *channel_list, View2D *v2d)
static void draw_keylist_block(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
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 fcurve_to_keylist(AnimData *adt, FCurve *fcu, AnimKeylist *keylist, const int saction_flag, float2 range, const bool use_nla_remapping)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void ED_add_fcurve_channel(ChannelDrawList *channel_list, bAnimListElem *ale, FCurve *fcu, float ypos, float yscale_fac, int saction_flag)
VecBase< float, 2 > float2
void immUniform1f(const char *name, float x)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void immVertex2f(uint attr_id, float x, float y)
void grease_pencil_data_block_to_keylist(AnimData *adt, const GreasePencil *grease_pencil, AnimKeylist *keylist, const int saction_flag, const bool active_layer_only)
static void channel_list_draw_keys(ChannelDrawList *channel_list, View2D *v2d)
static void draw_keylist_block_gpencil(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
static void prepare_channel_for_drawing(ChannelListElement *elem)
void ED_add_scene_channel(ChannelDrawList *channel_list, bDopeSheet *ads, Scene *sce, float ypos, float yscale_fac, int saction_flag)
@ GPU_SHADER_KEYFRAME_SHAPE
void ED_add_summary_channel(ChannelDrawList *channel_list, bAnimContext *ac, float ypos, float yscale_fac, int saction_flag)
void action_group_to_keylist(AnimData *adt, bActionGroup *agrp, AnimKeylist *keylist, const int saction_flag, float2 range)
void ED_keylist_prepare_for_direct_access(AnimKeylist *keylist)
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, float2 range)
void GPU_program_point_size(bool enable)
AnimKeylist * ED_keylist_create()
static int channel_visible_key_len(const View2D *v2d, const ListBaseT< ActKeyColumn > *keys)
int64_t ED_keylist_array_len(const AnimKeylist *keylist)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void ob_to_keylist(bDopeSheet *ads, Object *ob, AnimKeylist *keylist, const int saction_flag, float2 range)
void ED_channel_list_free(ChannelDrawList *channel_list)
void scene_to_keylist(bDopeSheet *ads, Scene *sce, AnimKeylist *keylist, const int saction_flag, float2 range)
static void channel_list_build_keylists(ChannelDrawList *channel_list, float2 range)
static void draw_keylist_blocks(const DrawKeylistUIData *ctx, const ActKeyColumn *keys, const int key_len, float ypos)
static ChannelListElement * channel_list_add_element(ChannelDrawList *channel_list, ChannelType elem_type, float ypos, float yscale_fac, eSAction_Flag saction_flag)
void immAttr1f(uint attr_id, float x)
@ KEYFRAME_HANDLE_ALIGNED
@ KEYFRAME_HANDLE_AUTO_CLAMP
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static void draw_keylist_block_interpolation_line(const DrawKeylistUIData *ctx, const ActKeyColumn *ab, float ypos)
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)
void ED_channel_list_flush(ChannelDrawList *channel_list, View2D *v2d)
void ED_add_object_channel(ChannelDrawList *channel_list, bDopeSheet *ads, Object *ob, float ypos, float yscale_fac, int saction_flag)
static int channel_list_visible_key_len(const ChannelDrawList *channel_list, const View2D *v2d)
void mask_to_keylist(bDopeSheet *, MaskLayer *masklay, AnimKeylist *keylist)
void ED_keylist_free(AnimKeylist *keylist)
static void channel_list_draw(ChannelDrawList *channel_list, View2D *v2d)
MINLINE void copy_v4_v4(float r[4], const float a[4])
static void draw_channel_keys(ChannelListElement *elem, View2D *v2d, const KeyframeShaderBindings *sh_bindings)
void immAttr1u(uint attr_id, uint x)
@ SACTION_SHOW_INTERPOLATION
void GPU_blend(GPUBlend blend)
const ListBaseT< ActKeyColumn > * ED_keylist_listbase(const AnimKeylist *keylist)
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 channel_ui_data_init(DrawKeylistUIData *ctx, View2D *v2d, float yscale_fac, bool channel_locked, eSAction_Flag saction_flag)
void ED_add_action_group_channel(ChannelDrawList *channel_list, bAnimListElem *ale, bActionGroup *agrp, float ypos, 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_grease_pencil_cels_channel(ChannelDrawList *channel_list, bDopeSheet *ads, const GreasePencilLayer *layer, const float ypos, const float yscale_fac, int saction_flag)
@ ACTKEYBLOCK_FLAG_IPO_CONSTANT
@ ACTKEYBLOCK_FLAG_IPO_LINEAR
@ ACTKEYBLOCK_FLAG_STATIC_HOLD
@ ACTKEYBLOCK_FLAG_GPENCIL
@ ACTKEYBLOCK_FLAG_IPO_OTHER
int actkeyblock_get_valid_hold(const ActKeyColumn *ac)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eBezTriple_KeyframeType key_type
ListBaseT< ChannelListElement > channels
const GreasePencilLayerTreeGroup * grease_pencil_layer_group
animrig::Slot * action_slot
ChannelListElement * prev
ChannelListElement * next
eSAction_Flag saction_flag
const GreasePencil * grease_pencil
const GreasePencilLayer * grease_pencil_layer
float ipo_color_constant[4]
float ipo_color_linear[4]