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
This commit is contained in:
Mattias Fredriksson 2021-08-29 16:30:17 -05:00 committed by Hans Goudey
parent 2f7258d618
commit 084180874c
1 changed files with 4 additions and 8 deletions

View File

@ -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. */