diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-01-22 23:16:00 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-01-22 23:16:00 +0300 |
commit | 181424152611aa7d842ece0265fb6c630c7a4d77 (patch) | |
tree | 9a592b9f8349195ab93a2f722acf63d01289a265 /source/blender/editors/space_action/action_draw.c | |
parent | cdaed4d360e77f20c51e21a7b3fc800c3ca92afc (diff) | |
parent | ce8889175a553967583a1152e71b4390a240a112 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/space_action/action_draw.c
Diffstat (limited to 'source/blender/editors/space_action/action_draw.c')
-rw-r--r-- | source/blender/editors/space_action/action_draw.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index df9c67b1f2e..d82d38ac0eb 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -171,6 +171,8 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) unsigned char col1a[3], col2a[3]; unsigned char col1b[3], col2b[3]; + const bool show_group_colors = !(saction->flag & SACTION_NODRAWGCOLORS); + /* get theme colors */ UI_GetThemeColor3ubv(TH_BACK, col2); @@ -254,8 +256,36 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) } case ANIMTYPE_GROUP: { - if (sel) immUniformColor4ub(col1a[0], col1a[1], col1a[2], 0x22); - else immUniformColor4ub(col2a[0], col2a[1], col2a[2], 0x22); + bActionGroup *agrp = ale->data; + if (show_group_colors && agrp->customCol) { + if (sel) { + unsigned char *cp = agrp->cs.select; + immUniformColor4ub(cp[0], cp[1], cp[2], 0x45); + } + else { + unsigned char *cp = agrp->cs.solid; + immUniformColor4ub(cp[0], cp[1], cp[2], 0x1D); + } + } + else { + if (sel) immUniformColor4ub(col1a[0], col1a[1], col1a[2], 0x22); + else immUniformColor4ub(col2a[0], col2a[1], col2a[2], 0x22); + } + break; + } + case ANIMTYPE_FCURVE: + { + FCurve *fcu = ale->data; + if (show_group_colors && fcu->grp && fcu->grp->customCol) { + unsigned char *cp = fcu->grp->cs.active; + + if (sel) immUniformColor4ub(cp[0], cp[1], cp[2], 0x65); + else immUniformColor4ub(cp[0], cp[1], cp[2], 0x0B); + } + else { + if (sel) immUniformColor4ub(col1[0], col1[1], col1[2], 0x22); + else immUniformColor4ub(col2[0], col2[1], col2[2], 0x22); + } break; } default: |