Fix #119177: False positive dyntopo attribute detection warning

".sculpt_mask" is handled as a special case for dynamic topology
but wasn't detected that way in the warning.

Pull Request: https://projects.blender.org/blender/blender/pulls/119665
This commit is contained in:
Hans Goudey 2024-03-19 16:55:21 +01:00 committed by Hans Goudey
parent cd476226d8
commit cc0e015a35

@ -293,11 +293,12 @@ static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, enum WarnFlag
static bool dyntopo_supports_layer(const CustomDataLayer &layer)
{
if (layer.type == CD_PROP_FLOAT && STREQ(layer.name, ".sculpt_mask")) {
return true;
}
if (CD_TYPE_AS_MASK(layer.type) & CD_MASK_PROP_ALL) {
/* Some data is stored as generic attributes on #Mesh but in flags or fields on #BMesh. */
return BM_attribute_stored_in_bmesh_builtin(layer.name);
}
/* Some layers just encode #Mesh topology or are handled as special cases for dyntopo. */
return ELEM(layer.type, CD_ORIGINDEX);
}