Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/makesrna/intern/rna_attribute.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c
index 6f3688b66f5..5efbebc9b97 100644
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@ -339,9 +339,17 @@ static int rna_Attributes_layer_skip(CollectionPropertyIterator *UNUSED(iter), v
return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_PROP_ALL);
}
-static int rna_Attributes_noncolor_layer_skip(CollectionPropertyIterator *UNUSED(iter), void *data)
+static int rna_Attributes_noncolor_layer_skip(CollectionPropertyIterator *iter, void *data)
{
CustomDataLayer *layer = (CustomDataLayer *)data;
+
+ /* Check valid domain here, too, keep in line with rna_AttributeGroup_color_length(). */
+ ID *id = iter->parent.owner_id;
+ AttributeDomain domain = BKE_id_attribute_domain(id, layer);
+ if (!ELEM(domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CORNER)) {
+ return 1;
+ }
+
return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_COLOR_ALL) || (layer->flag & CD_FLAG_TEMPORARY);
}