Fix T94344: Incorrect size for edge vertices node output

This looks like a copy and paste error from the original commit.
The virtual array output used the number of mesh polygons instead
of the number of edges.
This commit is contained in:
Hans Goudey 2021-12-23 16:22:07 -06:00
parent 2df912466c
commit 35bd6fe993
Notes: blender-bot 2023-02-14 09:43:37 +01:00
Referenced by issue #94464, Blender Video texture not refreshing
Referenced by issue #94344, Blender Geometry Node: Incorrect transfer of edge vertices index
Referenced by issue #93620, Cycles X broke OptiX memory pooling via NVLink
1 changed files with 2 additions and 3 deletions

View File

@ -50,12 +50,11 @@ static VArray<int> construct_edge_vertices_gvarray(const MeshComponent &componen
return {};
}
if (domain == ATTR_DOMAIN_EDGE) {
if (vertex == VERTEX_ONE) {
return VArray<int>::ForFunc(mesh->totpoly,
return VArray<int>::ForFunc(mesh->totedge,
[mesh](const int i) -> int { return mesh->medge[i].v1; });
}
return VArray<int>::ForFunc(mesh->totpoly,
return VArray<int>::ForFunc(mesh->totedge,
[mesh](const int i) -> int { return mesh->medge[i].v2; });
}
return {};