Sculpt: Fix T103724: missing mask attr existance check for PBVH_GRIDS

This commit is contained in:
Joseph Eagar 2023-01-12 23:57:01 -08:00
parent c158dd560e
commit daedf19315
Notes: blender-bot 2023-02-13 13:38:12 +01:00
Referenced by issue #103724, Regression: Disappearing mesh with cloth brush fresh multires modifier
5 changed files with 9 additions and 4 deletions

@ -1 +1 @@
Subproject commit 4f6dbb69893bd6bdf73467effe77ae46c8e4ee37
Subproject commit 7084c4ecd97d93459d9d23fd90f81589b09be5df

@ -1 +1 @@
Subproject commit bf49eeaa14c445d3c53068203fdf91bff568fe64
Subproject commit a9d4443c244f89399ec4bcc427e05a07950528cc

@ -1 +1 @@
Subproject commit 0f72f6c85c3743a9072273acb6a8a34b1cf1064b
Subproject commit bdcfdd47ec3451822b21d1cff2ea2db751093c9a

View File

@ -259,6 +259,11 @@ float SCULPT_vertex_mask_get(SculptSession *ss, PBVHVertRef vertex)
}
case PBVH_GRIDS: {
const CCGKey *key = BKE_pbvh_get_grid_key(ss->pbvh);
if (key->mask_offset == -1) {
return 0.0f;
}
const int grid_index = vertex.i / key->grid_area;
const int vertex_index = vertex.i - grid_index * key->grid_area;
CCGElem *elem = BKE_pbvh_get_grids(ss->pbvh)[grid_index];

@ -1 +1 @@
Subproject commit 3582f5326d08ca05c2a19056597e49ec5511d854
Subproject commit e1744b9bd82527cf7e8af63362b61bd309b5711b