Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-08-19 17:59:01 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-08-19 18:06:41 +0300
commit71655ff8dfae7eb63a237f03bea414ff4ebc5714 (patch)
tree4a49500589bec60fa9a5161b5c8f3270b1fa134a
parent7192e57d63a53a96461ba3ea761240f25a4294b7 (diff)
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
-rw-r--r--source/blender/editors/space_action/action_draw.c8
1 files changed, 7 insertions, 1 deletions
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];