[Bf-blender-cvs] [eccd03a826b] master: UI: Flip driver editor debug lines

Red Mser noreply at git.blender.org
Thu Jul 15 21:22:44 CEST 2021


Commit: eccd03a826b1c1465f28f93d35ca21359a6dc4e5
Author: Red Mser
Date:   Thu Jul 15 15:20:37 2021 -0400
Branches: master
https://developer.blender.org/rBeccd03a826b1c1465f28f93d35ca21359a6dc4e5

UI: Flip driver editor debug lines

In driver editor, vertically flip the value debug lines to align
them with the timeline header values. This makes it easier to read
the values. Also set the line width explicitly, which was incorrect
in some cases.

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

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

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

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

diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 56592cbbd1b..af88bbced9c 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -1259,14 +1259,15 @@ static void graph_draw_driver_debug(bAnimContext *ac, ID *id, FCurve *fcu)
       immUniformColor3f(0.9f, 0.9f, 0.9f);
       immUniform1f("dash_width", 10.0f);
       immUniform1f("dash_factor", 0.5f);
+      GPU_line_width(1.0f);
 
-      immBegin(GPU_PRIM_LINES, (y >= v2d->cur.ymin) ? 4 : 2);
+      immBegin(GPU_PRIM_LINES, (y <= v2d->cur.ymax) ? 4 : 2);
 
       /* x-axis lookup */
       co[0] = x;
 
-      if (y >= v2d->cur.ymin) {
-        co[1] = v2d->cur.ymin - 1.0f;
+      if (y <= v2d->cur.ymax) {
+        co[1] = v2d->cur.ymax + 1.0f;
         immVertex2fv(shdr_pos, co);
 
         co[1] = y;



More information about the Bf-blender-cvs mailing list