Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/attribute.cc
| Show First 20 Lines • Show All 467 Lines • ▼ Show 20 Lines | CustomDataLayer *BKE_id_attributes_active_get(ID *id) | ||||
| int index = 0; | int index = 0; | ||||
| for (const int domain : IndexRange(ATTR_DOMAIN_NUM)) { | for (const int domain : IndexRange(ATTR_DOMAIN_NUM)) { | ||||
| CustomData *customdata = info[domain].customdata; | CustomData *customdata = info[domain].customdata; | ||||
| if (customdata) { | if (customdata) { | ||||
| for (int i = 0; i < customdata->totlayer; i++) { | for (int i = 0; i < customdata->totlayer; i++) { | ||||
| CustomDataLayer *layer = &customdata->layers[i]; | CustomDataLayer *layer = &customdata->layers[i]; | ||||
| if (CD_MASK_PROP_ALL & CD_TYPE_AS_MASK(layer->type)) { | if (CD_MASK_PROP_ALL & CD_TYPE_AS_MASK(layer->type)) { | ||||
| if (index == active_index) { | if (index == active_index && BKE_attribute_allow_procedural_access(layer->name)) { | ||||
| return layer; | return layer; | ||||
| } | } | ||||
| index++; | index++; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines | |||||