From 00671572511c1c540ecdff1cdeea34a0fdba5297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 27 Sep 2016 16:53:43 +0200 Subject: [PATCH] Dim status line for strips with atc_is_synced == False --- blender_cloud/attract/draw.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blender_cloud/attract/draw.py b/blender_cloud/attract/draw.py index 1b039b0..6ce156d 100644 --- a/blender_cloud/attract/draw.py +++ b/blender_cloud/attract/draw.py @@ -46,7 +46,7 @@ def get_strip_rectf(strip, pixel_size_y): def draw_underline_in_strip(strip_coords, pixel_size, color): - from bgl import glColor3f, glRectf, glEnable, glDisable, GL_BLEND + from bgl import glColor4f, glRectf, glEnable, glDisable, GL_BLEND context = bpy.context @@ -56,7 +56,7 @@ def draw_underline_in_strip(strip_coords, pixel_size, color): # be careful not to draw over the current frame line cf_x = context.scene.frame_current_final - glColor3f(*color) + glColor4f(*color) glEnable(GL_BLEND) if s_x1 < cf_x < s_x2: @@ -106,7 +106,10 @@ def draw_callback_px(): color = strip_status_colour[status] else: color = strip_status_colour[None] - draw_underline_in_strip(strip_coords, pixel_size_x, color) + + alpha = 1.0 if strip.atc_is_synced else 0.5 + + draw_underline_in_strip(strip_coords, pixel_size_x, color + (alpha, )) def tag_redraw_all_sequencer_editors():