[Bf-blender-cvs] [7b8fa71e703] temp-geometry-nodes-instances-api-v2: Correct transform of instances

Hans Goudey noreply at git.blender.org
Sat Feb 6 01:30:55 CET 2021


Commit: 7b8fa71e7037fe9b14e0f88b37bb5fccc1bd5f0a
Author: Hans Goudey
Date:   Fri Feb 5 18:30:49 2021 -0600
Branches: temp-geometry-nodes-instances-api-v2
https://developer.blender.org/rB7b8fa71e7037fe9b14e0f88b37bb5fccc1bd5f0a

Correct transform of instances

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

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

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

diff --git a/source/blender/nodes/geometry/node_geometry_util.cc b/source/blender/nodes/geometry/node_geometry_util.cc
index 5b3da930abb..5b144441a91 100644
--- a/source/blender/nodes/geometry/node_geometry_util.cc
+++ b/source/blender/nodes/geometry/node_geometry_util.cc
@@ -106,10 +106,10 @@ static Mesh *join_mesh_topology_and_builtin_attributes(Span<GeometryInstanceGrou
           const MVert &old_vert = mesh.mvert[i];
           MVert &new_vert = new_mesh->mvert[vert_offset + i];
 
+          new_vert = old_vert;
+
           const float3 new_position = transform * float3(old_vert.co);
           copy_v3_v3(new_vert.co, new_position);
-
-          new_vert = old_vert;
         }
         for (const int i : IndexRange(mesh.totedge)) {
           const MEdge &old_edge = mesh.medge[i];



More information about the Bf-blender-cvs mailing list