diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-12-02 19:14:38 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-12-02 19:14:46 +0300 |
commit | 35217b4c06e76b3de1a055902939ee01cafdf84f (patch) | |
tree | f0b7b7672cbf21c4e19af5bcafa01bf967f24c96 /source/blender/draw | |
parent | 8b260fec0c7d89c1e9bd0d876176d8d5f7efa036 (diff) |
Fix T72114 Overlays: Curves are not drawing anymore (objectmode)
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_wireframe.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c index d86f524cb48..189df443d64 100644 --- a/source/blender/draw/engines/overlay/overlay_wireframe.c +++ b/source/blender/draw/engines/overlay/overlay_wireframe.c @@ -119,6 +119,26 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, const bool use_wire = (pd->overlay.flag & V3D_OVERLAY_WIREFRAMES) || (ob->dtx & OB_DRAWWIRE) || (ob->dt == OB_WIRE); + if (ELEM(ob->type, OB_CURVE, OB_SURF)) { + OVERLAY_ExtraCallBuffers *cb = OVERLAY_extra_call_buffer_get(vedata, ob); + float *color; + DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color); + + struct GPUBatch *geom = NULL; + switch (ob->type) { + case OB_CURVE: + geom = DRW_cache_curve_edge_wire_get(ob); + break; + case OB_SURF: + geom = DRW_cache_surf_edge_wire_get(ob); + break; + } + + if (geom) { + OVERLAY_extra_wire(cb, geom, ob->obmat, color); + } + } + /* Fast path for duplis. */ if (dupli && !init_dupli) { if (dupli->wire_shgrp && dupli->wire_geom) { |