diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-05-21 16:48:26 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-10-27 09:35:50 +0300 |
commit | b3b2cd1fa9f28f698e385a96fbc137db8c9415af (patch) | |
tree | 5d0a79e4a336e33b4fde06567790a54f81c19914 /source/blender/draw/engines | |
parent | d9799e770630c3971106bcadd45010bc82824f09 (diff) |
Fix T88443: Lattice still shows edges with "Bounds" display type
Lattice wires are drawn as part of "Extras". Unlike the other types
details (Cameras, Lights, Lightprobes and Speakers), Lattices actually
have boundingboxes defined, so hide the lattice wires if only the
boundingbox is requested.
Maniphest Tasks: T88443
Differential Revision: https://developer.blender.org/D11343
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index b07e86000fd..7f9e37f58d5 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -463,9 +463,14 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob) case OB_LIGHTPROBE: OVERLAY_lightprobe_cache_populate(vedata, ob); break; - case OB_LATTICE: - OVERLAY_lattice_cache_populate(vedata, ob); + case OB_LATTICE: { + /* Unlike the other types above, lattices actually have a bounding box defined, so hide the + * lattice wires if only the boundingbox is requested. */ + if (ob->dt > OB_BOUNDBOX) { + OVERLAY_lattice_cache_populate(vedata, ob); + } break; + } } } |