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.
This commit is contained in:
Joseph Eagar 2022-12-13 08:46:05 -08:00
parent 246df68095
commit 0a5e8a6342
1 changed files with 3 additions and 2 deletions

View File

@ -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;