From 71655ff8dfae7eb63a237f03bea414ff4ebc5714 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Thu, 19 Aug 2021 16:59:01 +0200 Subject: GPencil: Match row color for Summary in Grease Pencil animation editor The background of the summary row was different in Grease Pencil mode. Reviewed by: Pablo Vazquez, Matias Mendiola --- source/blender/editors/space_action/action_draw.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index 903754f4fb1..0a143c35a2a 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -144,12 +144,14 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region uchar col1[4], col2[4]; uchar col1a[4], col2a[4]; uchar col1b[4], col2b[4]; + uchar col_summary[4]; const bool show_group_colors = U.animation_flag & USER_ANIM_SHOW_CHANNEL_GROUP_COLORS; /* get theme colors */ UI_GetThemeColor4ubv(TH_SHADE2, col2); UI_GetThemeColor4ubv(TH_HILITE, col1); + UI_GetThemeColor4ubv(TH_ANIM_ACTIVE, col_summary); UI_GetThemeColor4ubv(TH_GROUP, col2a); UI_GetThemeColor4ubv(TH_GROUP_ACTIVE, col1a); @@ -244,7 +246,11 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region else if (ac->datatype == ANIMCONT_GPENCIL) { uchar *color; uchar gpl_col[4]; - if ((show_group_colors) && (ale->type == ANIMTYPE_GPLAYER)) { + if (ale->type == ANIMTYPE_SUMMARY) { + color = col_summary; + color[3] = col1[3]; + } + else if ((show_group_colors) && (ale->type == ANIMTYPE_GPLAYER)) { bGPDlayer *gpl = (bGPDlayer *)ale->data; rgb_float_to_uchar(gpl_col, gpl->color); gpl_col[3] = col1[3]; -- cgit v1.2.3