[Bf-blender-cvs] [b3b2cd1fa9f] master: Fix T88443: Lattice still shows edges with "Bounds" display type

Philipp Oeser noreply at git.blender.org
Wed Oct 27 08:36:18 CEST 2021


Commit: b3b2cd1fa9f28f698e385a96fbc137db8c9415af
Author: Philipp Oeser
Date:   Fri May 21 15:48:26 2021 +0200
Branches: master
https://developer.blender.org/rBb3b2cd1fa9f28f698e385a96fbc137db8c9415af

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

===================================================================

M	source/blender/draw/engines/overlay/overlay_engine.c

===================================================================

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;
+      }
     }
   }



More information about the Bf-blender-cvs mailing list