diff options
author | Mattias Fredriksson <Osares> | 2021-08-30 00:30:17 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-08-30 00:30:17 +0300 |
commit | 084180874ccf4d961cdc956131eb397c7181527c (patch) | |
tree | 8b57fa269073170505b734d5ec3d01fe41a92c64 /source/blender/nodes/geometry | |
parent | 2f7258d618a2a38fc982a9e0d0d7dd3cbc95ab3a (diff) |
Fix: Circle mesh primitive outer edges do not render
The outer edges created om the circle mesh primitive node
weren't marked with the flags that makes them show in wireframe
mode.
Differential Revision: https://developer.blender.org/D12152
Diffstat (limited to 'source/blender/nodes/geometry')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc index 131f9548b40..b0bb547eb45 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc @@ -143,18 +143,14 @@ static Mesh *create_circle_mesh(const float radius, } /* Create outer edges. */ + const short edge_flag = (fill_type == GEO_NODE_MESH_CIRCLE_FILL_NONE) ? + ME_LOOSEEDGE : + (ME_EDGEDRAW | ME_EDGERENDER); /* NGON or TRIANGLE_FAN */ for (const int i : IndexRange(verts_num)) { MEdge &edge = edges[i]; edge.v1 = i; edge.v2 = (i + 1) % verts_num; - } - - /* Set loose edge flags. */ - if (fill_type == GEO_NODE_MESH_CIRCLE_FILL_NONE) { - for (const int i : IndexRange(verts_num)) { - MEdge &edge = edges[i]; - edge.flag |= ME_LOOSEEDGE; - } + edge.flag = edge_flag; } /* Create triangle fan edges. */ |