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.
This commit is contained in:
Joseph Eagar
2022-09-20 10:00:41 -07:00
parent bf14757709
commit 32b766223a
3 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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