Fix T100687: Geometry Attribute Convert crashes in sculpt mode
Since above commit, `BKE_id_attributes_active_get` would also return "internal" attributes like ".hide_poly" or ".hide_vert". As a consequence, a couple of poll functions dont return false anymore (attribute remove, attribute convert), allowing these operators to execute, but acting on this "internal" layers is just asking for trouble. In the UI, we dont see these attributes, because `MESH_UL_attributes` checks `is_internal`, same thing we do now in `BKE_id_attributes_active_get`. Maniphest Tasks: T100687 Differential Revision: https://developer.blender.org/D15833
This commit is contained in:
parent
831ed297d0
commit
a50ca6a1cd
Notes:
blender-bot
2023-02-14 11:34:30 +01:00
Referenced by issue #100687, Geometry Attribute Convert crashes in sculpt mode
|
@ -473,7 +473,7 @@ CustomDataLayer *BKE_id_attributes_active_get(ID *id)
|
|||
for (int i = 0; i < customdata->totlayer; i++) {
|
||||
CustomDataLayer *layer = &customdata->layers[i];
|
||||
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;
|
||||
}
|
||||
index++;
|
||||
|
|
Loading…
Reference in New Issue