[Bf-blender-cvs] [92964a29b5f] temp-pbvh-split: temp-pbvh-split: fix improver use of mesh->mvert

Joseph Eagar noreply at git.blender.org
Fri Oct 7 21:28:45 CEST 2022


Commit: 92964a29b5fa6c4bbc42551290e00d5065c146d4
Author: Joseph Eagar
Date:   Fri Oct 7 12:28:25 2022 -0700
Branches: temp-pbvh-split
https://developer.blender.org/rB92964a29b5fa6c4bbc42551290e00d5065c146d4

temp-pbvh-split: fix improver use of mesh->mvert

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

M	source/blender/blenkernel/intern/pbvh_pixels.cc

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

diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc
index 1565191cfc3..cbbd25d3f4b 100644
--- a/source/blender/blenkernel/intern/pbvh_pixels.cc
+++ b/source/blender/blenkernel/intern/pbvh_pixels.cc
@@ -174,6 +174,8 @@ static void split_pixel_node(PBVH *pbvh,
       continue;
     }
 
+    const MVert *mvert = BKE_pbvh_get_verts(pbvh);
+
     for (const PackedPixelRow &row : tile.pixel_rows) {
       UDIMTilePixels *tile1 = &data1->tiles[i];
       UDIMTilePixels *tile2 = &data2->tiles[i];
@@ -182,9 +184,9 @@ static void split_pixel_node(PBVH *pbvh,
 
       float verts[3][3];
 
-      copy_v3_v3(verts[0], mesh->mvert[tri.vert_indices[0]].co);
-      copy_v3_v3(verts[1], mesh->mvert[tri.vert_indices[1]].co);
-      copy_v3_v3(verts[2], mesh->mvert[tri.vert_indices[2]].co);
+      copy_v3_v3(verts[0], mvert[tri.vert_indices[0]].co);
+      copy_v3_v3(verts[1], mvert[tri.vert_indices[1]].co);
+      copy_v3_v3(verts[2], mvert[tri.vert_indices[2]].co);
 
       float2 delta = tri.delta_barycentric_coord_u;
       float2 uv1 = row.start_barycentric_coord;



More information about the Bf-blender-cvs mailing list