diff options
Diffstat (limited to 'source/blender/editors/animation/anim_draw.c')
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index d903d8d9235..623a3e82ecc 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -167,7 +167,8 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f); + immUniformThemeColorShadeAlpha(TH_ANIM_ACTIVE, -25, -30); + //immUniformColor4f(0.8f, 0.44f, 0.1f, 0.2f); /* XXX: Fix this hardcoded color (anim_active) */ /* only draw two separate 'curtains' if there's no overlap between them */ if (PSFRA < PEFRA + end_frame_width) { @@ -190,7 +191,14 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width) /* Draw frame range guides (for scene frame range) in background */ // TODO: Should we still show these when preview range is enabled? void ANIM_draw_framerange(Scene *scene, View2D *v2d) -{ +{ + /* Don't draw frame range when preview range is enabled. + * Otherwise we get nasty/confusing visual conflicts + */ + if (PRVRANGEON) { + return; + } + /* draw darkened area outside of active timeline frame range */ glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); |