[Bf-blender-cvs] [a87eee65fc7] master: Fix T76196: Curve Display hides wires as soon as any part has faces [due to filling/extrude/etc]

Philipp Oeser noreply at git.blender.org
Tue Jun 2 21:52:11 CEST 2020


Commit: a87eee65fc768b7bc3c2f8c33d043b577f84f124
Author: Philipp Oeser
Date:   Fri May 29 13:10:26 2020 +0200
Branches: master
https://developer.blender.org/rBa87eee65fc768b7bc3c2f8c33d043b577f84f124

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

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

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

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

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);



More information about the Bf-blender-cvs mailing list