[Bf-blender-cvs] [71655ff8dfa] master: GPencil: Match row color for Summary in Grease Pencil animation editor

Antonio Vazquez noreply at git.blender.org
Thu Aug 19 17:07:07 CEST 2021


Commit: 71655ff8dfae7eb63a237f03bea414ff4ebc5714
Author: Antonio Vazquez
Date:   Thu Aug 19 16:59:01 2021 +0200
Branches: master
https://developer.blender.org/rB71655ff8dfae7eb63a237f03bea414ff4ebc5714

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

===================================================================

M	source/blender/editors/space_action/action_draw.c

===================================================================

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];



More information about the Bf-blender-cvs mailing list