[Bf-blender-cvs] [b60f2986087] sculpt-dev: sculpt-dev: fix crash with missing pmap

Joseph Eagar noreply at git.blender.org
Thu Jun 2 05:21:44 CEST 2022


Commit: b60f298608742d23db2e0198784f516be5d48929
Author: Joseph Eagar
Date:   Wed Jun 1 20:21:32 2022 -0700
Branches: sculpt-dev
https://developer.blender.org/rBb60f298608742d23db2e0198784f516be5d48929

sculpt-dev: fix crash with missing pmap

===================================================================

M	source/blender/blenkernel/intern/paint.c

===================================================================

diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index ecb06ede1ba..fa02b4da7e4 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -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;



More information about the Bf-blender-cvs mailing list