[Bf-blender-cvs] [35bd6fe993a] master: Fix T94344: Incorrect size for edge vertices node output

Hans Goudey noreply at git.blender.org
Thu Dec 23 23:22:17 CET 2021


Commit: 35bd6fe993a11df8395f2ef740fd0afa38c77b61
Author: Hans Goudey
Date:   Thu Dec 23 16:22:07 2021 -0600
Branches: master
https://developer.blender.org/rB35bd6fe993a11df8395f2ef740fd0afa38c77b61

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.

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc

===================================================================

diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
index 473bef63e92..edf3f7c3e81 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
@@ -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 {};



More information about the Bf-blender-cvs mailing list