Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRed Mser <RedMser>2021-07-15 22:20:37 +0300
committerHans Goudey <h.goudey@me.com>2021-07-15 22:20:37 +0300
commiteccd03a826b1c1465f28f93d35ca21359a6dc4e5 (patch)
tree4f43d707d1bcca75bc175df4ff5ea5050f9666f0
parent7d618b4dde6700a457e3738a1e17d58c43f4c6bb (diff)
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
-rw-r--r--source/blender/editors/space_graph/graph_draw.c7
1 files changed, 4 insertions, 3 deletions
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;