diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-09-20 20:00:41 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-09-20 20:03:28 +0300 |
commit | 32b766223a1b2a562e657a729e7d9f2926d42417 (patch) | |
tree | 84777afb84db764d7ea41c6fbc268a45a71d473c | |
parent | bf1475770986d411d8b8036d9097745d80b37242 (diff) |
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.
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 1 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_expand.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_face_set.cc | 1 |
3 files changed, 2 insertions, 2 deletions
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 |