mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
Fix #129388: Incorrect bounds for Geometry Nodes line primitive
This commit is contained in:
parent
0df5d8220b
commit
3bbf546d28
1 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,8 @@ Mesh *create_line_mesh(const float3 start, const float3 delta, const int count)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
Mesh *mesh = BKE_mesh_new_nomain(count, count - 1, 0, 0);
|
||||
const int edges_num = count - 1;
|
||||
Mesh *mesh = BKE_mesh_new_nomain(count, edges_num, 0, 0);
|
||||
MutableSpan<float3> positions = mesh->vert_positions_for_write();
|
||||
MutableSpan<int2> edges = mesh->edges_for_write();
|
||||
|
||||
|
@ -42,7 +43,7 @@ Mesh *create_line_mesh(const float3 start, const float3 delta, const int count)
|
|||
|
||||
mesh->tag_loose_verts_none();
|
||||
mesh->tag_overlapping_none();
|
||||
mesh->bounds_set_eager(*bounds::min_max<float3>({start, start + delta * count}));
|
||||
mesh->bounds_set_eager(*bounds::min_max<float3>({start, start + delta * edges_num}));
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue