sculpt-dev: fix crash with missing pmap

This commit is contained in:
Joseph Eagar 2022-06-01 20:21:32 -07:00
parent c12e3ff183
commit b60f298608
1 changed files with 4 additions and 0 deletions

View File

@ -2810,6 +2810,10 @@ PBVH *BKE_sculpt_object_pbvh_ensure(Depsgraph *depsgraph, Object *ob)
#endif
}
if (!ob->sculpt->pmap) {
ob->sculpt->pmap = BKE_pbvh_make_pmap(BKE_object_get_original_mesh(ob));
}
BKE_pbvh_set_pmap(pbvh, ob->sculpt->pmap);
ob->sculpt->pbvh = pbvh;