[Bf-blender-cvs] [bfbe9a0d554] temp_bmesh_multires: Fix bugs in last commit.

Joseph Eagar noreply at git.blender.org
Sun Oct 25 09:07:27 CET 2020


Commit: bfbe9a0d554373c38025ae03da856aaf815d7715
Author: Joseph Eagar
Date:   Sun Oct 25 01:07:05 2020 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rBbfbe9a0d554373c38025ae03da856aaf815d7715

Fix bugs in last commit.

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

M	source/blender/blenkernel/BKE_pbvh.h
M	source/blender/editors/sculpt_paint/sculpt_cloth.c

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

diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 0e65d0c2a50..3750e7d14cb 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -517,7 +517,7 @@ void pbvh_vertex_iter_init(PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int m
           } \
           vi.co = vi.mvert->co; \
           vi.no = vi.mvert->no; \
-          vi.index = vi.vert_indices[vi.i]; \
+          vi.index = vi.vertex.i = vi.vert_indices[vi.i]; \
           if (vi.vmask) { \
             vi.mask = &vi.vmask[vi.index]; \
           } \
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c
index 1f09eac37b8..d28c5e9ef69 100644
--- a/source/blender/editors/sculpt_paint/sculpt_cloth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c
@@ -1102,6 +1102,8 @@ void SCULPT_cloth_brush_simulation_init(SculptSession *ss, SculptClothSimulation
   const int totverts = SCULPT_vertex_count_get(ss);
   const bool has_deformation_pos = cloth_sim->deformation_pos != NULL;
   const bool has_softbody_pos = cloth_sim->softbody_pos != NULL;
+  SCULPT_vertex_random_access_ensure(ss);
+
   for (int i = 0; i < totverts; i++) {
     SculptVertRef vertex = BKE_pbvh_table_index_to_vertex(ss->pbvh, i);



More information about the Bf-blender-cvs mailing list