Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_attribute.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int rna_Attributes_layer_skip(CollectionPropertyIterator *UNUSED(iter), void *data) | static int rna_Attributes_layer_skip(CollectionPropertyIterator *UNUSED(iter), void *data) | ||||
| { | { | ||||
| CustomDataLayer *layer = (CustomDataLayer *)data; | CustomDataLayer *layer = (CustomDataLayer *)data; | ||||
| return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_PROP_ALL); | 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; | 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); | return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_COLOR_ALL) || (layer->flag & CD_FLAG_TEMPORARY); | ||||
| } | } | ||||
| /* Attributes are spread over multiple domains in separate CustomData, we use repeated | /* Attributes are spread over multiple domains in separate CustomData, we use repeated | ||||
| * array iterators to loop over all. */ | * array iterators to loop over all. */ | ||||
| static void rna_AttributeGroup_next_domain(ID *id, | static void rna_AttributeGroup_next_domain(ID *id, | ||||
| CollectionPropertyIterator *iter, | CollectionPropertyIterator *iter, | ||||
| int(skip)(CollectionPropertyIterator *iter, void *data)) | int(skip)(CollectionPropertyIterator *iter, void *data)) | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||