Mac OS draws object made from only vertices differently from Windows (object 'Display as' mode set to 'WIRE'). #74438

Closed
opened 2020-03-04 15:20:36 +01:00 by Jose Conseco · 12 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.19

Blender Version
Broken: version: 2.82 (sub 6), branch: master, commit date: 2020-02-11 14:45, hash: c939b4df18

Short description of error
Scene has cube mesh object - with edges and faces removed (only vertices are left). In object mode vertices will be visible as points, but if I want to hide them I can set object 'Display as' mode to - 'WIRE' then:

  • for Windows users - object vertices are no longer visible (nice)
  • for Mac users object vertices remain still visible (not good)
    Hopefully this can be unified to hide drawing of verts in object mode and 'WIRE' draw method for both OS.

Exact steps for others to reproduce the error

  • add cube - delete only edges and faces
  • set object draw mode (in object 'Viewport Display' props - to 'WIRE'. On Mac OS vertices remain visible.
    I attach blend with hidden cube vertices in object mode.
    BBoxDrawing.blend
**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.19 **Blender Version** Broken: version: 2.82 (sub 6), branch: master, commit date: 2020-02-11 14:45, hash: `c939b4df18` **Short description of error** Scene has cube mesh object - with edges and faces removed (only vertices are left). In object mode vertices will be visible as points, but if I want to hide them I can set object 'Display as' mode to - 'WIRE' then: - for Windows users - object vertices are no longer visible (nice) - for Mac users object vertices remain still visible (not good) Hopefully this can be unified to hide drawing of verts in object mode and 'WIRE' draw method for both OS. **Exact steps for others to reproduce the error** - add cube - delete only edges and faces - set object draw mode (in object 'Viewport Display' props - to 'WIRE'. On Mac OS vertices remain visible. I attach blend with hidden cube vertices in object mode. [BBoxDrawing.blend](https://archive.blender.org/developer/F8387981/BBoxDrawing.blend)
Author

Added subscriber: @JoseConseco

Added subscriber: @JoseConseco

Added subscribers: @fclem, @mano-wii

Added subscribers: @fclem, @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

In my opinion a mesh with only looseverts should be visible in both solid mode and wireframe mode.
This is how it worked in blender 2.79.

I don’t know why you say it’s not good to remain visible. The problem here seems to be on Windows and not on Mac.
@fclem, do you know if you had a decision on how it should be?

In my opinion a mesh with only looseverts should be visible in both solid mode and wireframe mode. This is how it worked in blender 2.79. I don’t know why you say it’s not good to remain visible. The problem here seems to be on Windows and not on Mac. @fclem, do you know if you had a decision on how it should be?
Author

Hiding verts by setting object 'Display as' WIRE in just nice option to have, IMO better to have 2 options, rather than make verts always visible.
In my case I want to be able to snap to invisible verts using build-in blender vert snapping tools, while I'm drawing them in python using BGL. But yep, you may say it is actually bug- and that they are should be always invisible - it is just nice trick to have (hiding verts by drawing object as wire)

Hiding verts by setting object 'Display as' WIRE in just nice option to have, IMO better to have 2 options, rather than make verts always visible. In my case I want to be able to snap to invisible verts using build-in blender vert snapping tools, while I'm drawing them in python using BGL. But yep, you may say it is actually bug- and that they are should be always invisible - it is just nice trick to have (hiding verts by drawing object as wire)

@mano-wii I don't remember any decision on this. It might be a bug. They don't show here either on linux.

@mano-wii I don't remember any decision on this. It might be a bug. They don't show here either on linux.

Added subscribers: @ankitm, @brecht

Added subscribers: @ankitm, @brecht

In my opinion the correct thing should be to follow what it was in 2.79.
So that should solve:

diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c
index 5dbdc71dae1..592542bd723 100644
--- a/source/blender/draw/engines/overlay/overlay_wireframe.c
+++ b/source/blender/draw/engines/overlay/overlay_wireframe.c
@@ -129,8 +129,10 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
   const bool all_wires = (ob->dtx & OB_DRAW_ALL_EDGES) != 0;
   const bool is_xray = (ob->dtx & OB_DRAWXRAY) != 0;
   const bool is_mesh = ob->type == OB_MESH;
-  const bool use_wire = (pd->overlay.flag & V3D_OVERLAY_WIREFRAMES) || (ob->dtx & OB_DRAWWIRE) ||
-                        (ob->dt == OB_WIRE);
+  const bool is_mesh_verts_only = is_mesh && (((Mesh *)ob->data)->totedge == 0 &&
+                                              ((Mesh *)ob->data)->totvert > 0);
+  const bool use_wire = !is_mesh_verts_only && ((pd->overlay.flag & V3D_OVERLAY_WIREFRAMES) ||
+                                                (ob->dtx & OB_DRAWWIRE) || (ob->dt == OB_WIRE));
 
   if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
     OVERLAY_ExtraCallBuffers *cb = OVERLAY_extra_call_buffer_get(vedata, ob);
@@ -221,7 +223,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
     DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color);
 
     /* Draw loose geometry. */
-    if (me->totedge == 0 && me->totvert > 0) {
+    if (is_mesh_verts_only) {
       struct GPUBatch *geom = DRW_cache_mesh_all_verts_get(ob);
       if (geom) {
         OVERLAY_extra_loose_points(cb, geom, ob->obmat, color);

But it's strange that on the Mac the drawing behaves differently.
@ankitm or @brecht, can you confirm that behavior on Mac?

In my opinion the correct thing should be to follow what it was in 2.79. So that should solve: ``` diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c index 5dbdc71dae1..592542bd723 100644 --- a/source/blender/draw/engines/overlay/overlay_wireframe.c +++ b/source/blender/draw/engines/overlay/overlay_wireframe.c @@ -129,8 +129,10 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, const bool all_wires = (ob->dtx & OB_DRAW_ALL_EDGES) != 0; const bool is_xray = (ob->dtx & OB_DRAWXRAY) != 0; const bool is_mesh = ob->type == OB_MESH; - const bool use_wire = (pd->overlay.flag & V3D_OVERLAY_WIREFRAMES) || (ob->dtx & OB_DRAWWIRE) || - (ob->dt == OB_WIRE); + const bool is_mesh_verts_only = is_mesh && (((Mesh *)ob->data)->totedge == 0 && + ((Mesh *)ob->data)->totvert > 0); + const bool use_wire = !is_mesh_verts_only && ((pd->overlay.flag & V3D_OVERLAY_WIREFRAMES) || + (ob->dtx & OB_DRAWWIRE) || (ob->dt == OB_WIRE)); if (ELEM(ob->type, OB_CURVE, OB_SURF)) { OVERLAY_ExtraCallBuffers *cb = OVERLAY_extra_call_buffer_get(vedata, ob); @@ -221,7 +223,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color); /* Draw loose geometry. */ - if (me->totedge == 0 && me->totvert > 0) { + if (is_mesh_verts_only) { struct GPUBatch *geom = DRW_cache_mesh_all_verts_get(ob); if (geom) { OVERLAY_extra_loose_points(cb, geom, ob->obmat, color); ``` But it's strange that on the Mac the drawing behaves differently. @ankitm or @brecht, can you confirm that behavior on Mac?
Member
tested on 2.83 `3da2dc8213` downloaded from https://builder.blender.org [Screen Recording 2020-03-05 at 23.52.59.mov](https://archive.blender.org/developer/F8391133/Screen_Recording_2020-03-05_at_23.52.59.mov)

This issue was referenced by 3912a2a227

This issue was referenced by 3912a2a227c9674476795407003e019ff9abc34d

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Clément Foucault self-assigned this 2020-03-09 17:10:02 +01:00

This issue was referenced by 1131e33026

This issue was referenced by 1131e33026297597037e89803330f9417a535838
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#74438
No description provided.