Fix invalid enum passed to BKE_id_attribute_search

This commit is contained in:
Campbell Barton
2023-03-16 11:23:00 +11:00
parent f2a05c3e4e
commit 64304b4e27

View File

@@ -1279,7 +1279,7 @@ static PointerRNA rna_Mesh_sculpt_vertex_color_active_get(PointerRNA *ptr)
{
Mesh *mesh = (Mesh *)ptr->data;
CustomDataLayer *layer = BKE_id_attribute_search(
&mesh->id, mesh->active_color_attribute, CD_MASK_PROP_COLOR, ATTR_DOMAIN_POINT);
&mesh->id, mesh->active_color_attribute, CD_MASK_PROP_COLOR, ATTR_DOMAIN_MASK_POINT);
return rna_pointer_inherit_refine(ptr, &RNA_MeshVertColorLayer, layer);
}
@@ -1301,7 +1301,7 @@ static int rna_Mesh_sculpt_vertex_color_active_index_get(PointerRNA *ptr)
{
Mesh *mesh = (Mesh *)ptr->data;
CustomDataLayer *layer = BKE_id_attribute_search(
&mesh->id, mesh->active_color_attribute, CD_MASK_PROP_COLOR, ATTR_DOMAIN_POINT);
&mesh->id, mesh->active_color_attribute, CD_MASK_PROP_COLOR, ATTR_DOMAIN_MASK_POINT);
if (!layer) {
return 0;
}