diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-05-29 14:10:26 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-06-02 22:42:34 +0300 |
commit | a87eee65fc768b7bc3c2f8c33d043b577f84f124 (patch) | |
tree | d45cd3619e32af659a3cdc16fa2d3dc31bfac0ef /source | |
parent | 85098bdb89495896a22bb1739cbe2af1d8343d59 (diff) |
Fix T76196: Curve Display hides wires as soon as any part has faces [due
to filling/extrude/etc]
Caused by rB6da097136cf4.
The file in the report has some parts of the curve object generate faces
[due to success in filling] and some others dont [where filling isnt
possible].
rB6da097136cf4 disabled the wires/curves drawing whenever any faces
would be generated (but the only way to see all wires was to set the
Fill Mode to None then).
So now only skip the wires/curves drawing if we are _not_ in wireframe
viewport shading and the object's viewport display options is above
'WIRE'.
This is an alternative fix to D7594 (and I think the better alternative,
thx @stevewarner suggesting this).
Maniphest Tasks: T76196
Differential Revision: https://developer.blender.org/D7874
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_wireframe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c index cb36f0ed326..a5ff7d8f1fa 100644 --- a/source/blender/draw/engines/overlay/overlay_wireframe.c +++ b/source/blender/draw/engines/overlay/overlay_wireframe.c @@ -197,13 +197,15 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, struct GPUBatch *geom = NULL; switch (ob->type) { case OB_CURVE: - if (ob->runtime.curve_cache && BKE_displist_has_faces(&ob->runtime.curve_cache->disp)) { + if (!pd->wireframe_mode && !use_wire && ob->runtime.curve_cache && + BKE_displist_has_faces(&ob->runtime.curve_cache->disp)) { break; } geom = DRW_cache_curve_edge_wire_get(ob); break; case OB_FONT: - if (ob->runtime.curve_cache && BKE_displist_has_faces(&ob->runtime.curve_cache->disp)) { + if (!pd->wireframe_mode && !use_wire && ob->runtime.curve_cache && + BKE_displist_has_faces(&ob->runtime.curve_cache->disp)) { break; } geom = DRW_cache_text_loose_edges_get(ob); |