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
This commit is contained in:
Philipp Oeser 2021-05-21 15:48:26 +02:00
parent d9799e7706
commit b3b2cd1fa9
Notes: blender-bot 2023-05-03 10:14:48 +02:00
Referenced by issue #88443, Lattice still shows edges with "Bounds" display type.
1 changed files with 7 additions and 2 deletions

View File

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