[Bf-blender-cvs] [6b8dde93b0c] master: Fix T95531: Draw y axis values in Driver Editor

Leon Schittek noreply at git.blender.org
Mon Mar 7 17:07:59 CET 2022


Commit: 6b8dde93b0ca898da16ff367d110f785e35e8981
Author: Leon Schittek
Date:   Mon Mar 7 16:15:16 2022 +0100
Branches: master
https://developer.blender.org/rB6b8dde93b0ca898da16ff367d110f785e35e8981

Fix T95531: Draw y axis values in Driver Editor

When drawing the driver editor, only skip drawing the "scrubbing area"
and not the Y-axis values or the scroll bars.

The issue was introduced in rBb3431a88465db2433b46e1f6426c801125d0047d
to avoid drawing the playhead in the Driver Editor but also prevented
the text on the y axis from being drawn.

Reviewed by: Severin, sybren

Maniphest Tasks: T95531

Differential Revision: https://developer.blender.org/D14022

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

M	source/blender/editors/space_graph/space_graph.c

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

diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 22427675ff3..f041f2d1d3b 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -295,16 +295,14 @@ static void graph_main_region_draw_overlay(const bContext *C, ARegion *region)
   /* draw entirely, view changes should be handled here */
   const SpaceGraph *sipo = CTX_wm_space_graph(C);
 
-  /* Driver Editor's X axis is not time. */
-  if (sipo->mode == SIPO_MODE_DRIVERS) {
-    return;
-  }
-
   const Scene *scene = CTX_data_scene(C);
   View2D *v2d = &region->v2d;
 
-  /* scrubbing region */
-  ED_time_scrub_draw_current_frame(region, scene, sipo->flag & SIPO_DRAWTIME);
+  /* Driver Editor's X axis is not time. */
+  if (sipo->mode != SIPO_MODE_DRIVERS) {
+    /* scrubbing region */
+    ED_time_scrub_draw_current_frame(region, scene, sipo->flag & SIPO_DRAWTIME);
+  }
 
   /* scrollers */
   /* FIXME: args for scrollers depend on the type of data being shown. */



More information about the Bf-blender-cvs mailing list