Commit: 4288b2a1d1f71bd20b97095122e9a895b3836ab8
Author: Pablo Dobarro
Date: Mon Feb 15 18:56:58 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB4288b2a1d1f71bd20b97095122e9a895b3836ab8
Sculpt Expand: Fix crash when editing an existing face set with Multires
===================================================================
M source/blender/editors/sculpt_paint/sculpt_expand.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c
b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 68bdf1bdc83..b1659b3dc2c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -700,6 +700,8 @@ static void
sculpt_expand_geodesics_from_state_boundary(Object *ob,
BLI_bitmap
*enabled_vertices)
{
SculptSession *ss = ob->sculpt;
+ BLI_assert(BKE_pbvh_type(ss->pbvh) == PBVH_FACES);
+
GSet *initial_vertices = BLI_gset_int_new("initial_vertices");
BLI_bitmap *boundary_vertices = sculpt_expand_boundary_from_enabled(ss,
enabled_vertices, false);
const int totvert = SCULPT_vertex_count_get(ss);
@@ -768,7 +770,12 @@ static void
sculpt_expand_initialize_from_face_set_boundary(Object *ob,
BLI_BITMAP_ENABLE(enabled_vertices, i);
}
- sculpt_expand_geodesics_from_state_boundary(ob, expand_cache,
enabled_vertices);
+ if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES) {
+ sculpt_expand_geodesics_from_state_boundary(ob, expand_cache,
enabled_vertices);
+ }
+ else {
+ sculpt_expand_topology_from_state_boundary(ob, expand_cache,
enabled_vertices);
+ }
MEM_freeN(enabled_vertices);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs