diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-19 22:23:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-19 22:33:52 +0300 |
commit | 72efee07ff837ca4651e25b63c0029b81e2d61b1 (patch) | |
tree | 3c668dd282b4e5a3e540ed742c7b562cc215a89e /source/blender/draw/modes/edit_curve_mode.c | |
parent | 896d62d1c27a4794538ed07a9dbf175c27bf053e (diff) |
Draw Manager: draw curve normals
Diffstat (limited to 'source/blender/draw/modes/edit_curve_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_curve_mode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c index 5ee3b23cdcb..f32c90c5a11 100644 --- a/source/blender/draw/modes/edit_curve_mode.c +++ b/source/blender/draw/modes/edit_curve_mode.c @@ -26,6 +26,8 @@ #include "DRW_engine.h" #include "DRW_render.h" +#include "DNA_curve_types.h" + /* If builtin shaders are needed */ #include "GPU_shader.h" @@ -217,6 +219,7 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob) if (ob->type == OB_CURVE) { if (ob == obedit) { + Curve *cu = ob->data; /* Get geometry cache */ struct Batch *geom; @@ -225,6 +228,11 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob) geom = DRW_cache_curve_edge_wire_get(ob); DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); + if ((cu->drawflag & CU_HIDE_NORMALS) == 0) { + geom = DRW_cache_curve_edge_normal_get(ob, scene->toolsettings->normalsize); + DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); + } + /* Add geom to a shading group */ geom = DRW_cache_curve_edge_overlay_get(ob); if (geom) { |