[Bf-blender-cvs] [0a5e8a63420] master: Sculpt: Fix crash in dyntopo

Joseph Eagar noreply at git.blender.org
Tue Dec 13 17:47:59 CET 2022


Commit: 0a5e8a63420de7efcf874370009831da8f19e215
Author: Joseph Eagar
Date:   Tue Dec 13 08:46:05 2022 -0800
Branches: master
https://developer.blender.org/rB0a5e8a63420de7efcf874370009831da8f19e215

Sculpt: Fix crash in dyntopo

Attribute wrangler in PBVH_BMESH mode was
converting real attributes (e.g. vertex node index)
into simple arrays when validating the attribute list.

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

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

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

diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc
index 200eb3e8732..3100b4cc20c 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -2466,7 +2466,8 @@ static bool sculpt_attribute_create(SculptSession *ss,
 
     out->data = MEM_calloc_arrayN(totelem, elemsize, __func__);
 
-    out->data_for_bmesh = ss->bm != nullptr;
+    out->data_for_bmesh = false;
+    out->params.simple_array = true;
     out->bmesh_cd_offset = -1;
     out->layer = nullptr;
     out->elem_size = elemsize;
@@ -2598,7 +2599,7 @@ static bool sculpt_attr_update(Object *ob, SculptAttribute *attr)
                             attr,
                             &attr->params,
                             BKE_pbvh_type(ss->pbvh),
-                            true);
+                            attr->data_for_bmesh);
   }
 
   return bad;



More information about the Bf-blender-cvs mailing list