UI: Graph Editor: Draw Handles Lines With Smoothing

Enabling "Use High Quality Display" in the graph editor enables
AA for the curves, this enables it for bezier handles too.

Differential Revision: https://developer.blender.org/D7740
This commit is contained in:
Hans Goudey 2020-05-15 15:12:58 -04:00
parent d9773edaa3
commit eaf7d36d66
Notes: blender-bot 2023-02-14 05:52:32 +01:00
Referenced by issue #76842, Multires & Undo & Frame Change causes weird behaviour with shapekeys
Referenced by issue #76845, Keyframes don't show up in timeline/dope sheet/graph editor
Referenced by issue #76837, Blender closing when clicking TAB after I hide object
Referenced by issue #76821, "Use Flow" tooltip still saying "Inflow" when Outflow is chosen
Referenced by issue #76823, Scaled Spotlight Does Not Work In Cycles
Referenced by issue #76824, EEVEE: Spotlight Parented To Scaled Object Behaves Incorrectly
1 changed files with 8 additions and 2 deletions

View File

@ -343,6 +343,10 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu)
uint color = GPU_vertformat_attr_add(
format, "color", GPU_COMP_U8, 4, GPU_FETCH_INT_TO_FLOAT_UNIT);
immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) {
GPU_line_smooth(true);
}
GPU_blend(true);
immBeginAtMost(GPU_PRIM_LINES, 4 * 2 * fcu->totvert);
@ -419,6 +423,10 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu)
immEnd();
immUnbindProgram();
GPU_blend(false);
if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) {
GPU_line_smooth(false);
}
}
/* Samples ---------------- */
@ -1181,9 +1189,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, shor
if (do_handles) {
/* only draw handles/vertices on keyframes */
GPU_blend(true);
draw_fcurve_handles(sipo, fcu);
GPU_blend(false);
}
draw_fcurve_vertices(region, fcu, do_handles, (sipo->flag & SIPO_SELVHANDLESONLY));