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:
parent
2f7258d618
commit
084180874c
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue