[Bf-blender-cvs] [32b766223a1] master: Sculpt: Fix T100479: Boundary expand crash
Joseph Eagar
noreply at git.blender.org
Tue Sep 20 19:03:32 CEST 2022
Commit: 32b766223a1b2a562e657a729e7d9f2926d42417
Author: Joseph Eagar
Date: Tue Sep 20 10:00:41 2022 -0700
Branches: master
https://developer.blender.org/rB32b766223a1b2a562e657a729e7d9f2926d42417
Sculpt: Fix T100479: Boundary expand crash
Face sets were not being initialized. I had also
forgotten to remove a dead struct member from
SculptBoundary which was being accessed.
===================================================================
M source/blender/blenkernel/BKE_paint.h
M source/blender/editors/sculpt_paint/sculpt_expand.c
M source/blender/editors/sculpt_paint/sculpt_face_set.cc
===================================================================
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 5728b29e8a5..ed0969a6306 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -417,7 +417,6 @@ typedef struct SculptBoundaryPreviewEdge {
typedef struct SculptBoundary {
/* Vertex indices of the active boundary. */
PBVHVertRef *verts;
- int *verts_i;
int verts_capacity;
int verts_num;
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 53972709a3e..72b0b3a97fe 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -617,7 +617,7 @@ static float *sculpt_expand_boundary_topology_falloff_create(Object *ob, const P
for (int i = 0; i < boundary->verts_num; i++) {
BLI_gsqueue_push(queue, &boundary->verts[i]);
- BLI_BITMAP_ENABLE(visited_verts, boundary->verts_i[i]);
+ BLI_BITMAP_ENABLE(visited_verts, BKE_pbvh_vertex_to_index(ss->pbvh, boundary->verts[i]));
}
SCULPT_boundary_data_free(boundary);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
index 7002ae7b358..485375a5cb1 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
@@ -1408,6 +1408,7 @@ static int sculpt_face_set_edit_invoke(bContext *C, wmOperator *op, const wmEven
return OPERATOR_CANCELLED;
}
+ ss->face_sets = BKE_sculpt_face_sets_ensure(BKE_mesh_from_object(ob));
BKE_sculpt_update_object_for_edit(depsgraph, ob, true, false, false);
/* Update the current active Face Set and Vertex as the operator can be used directly from the
More information about the Bf-blender-cvs
mailing list