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:
authorPhilipp Oeser <info@graphics-engineer.com>2022-09-01 14:55:20 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-09-03 12:30:51 +0300
commita50ca6a1cd72aa0556d74dd4a54de25bf2eeadcb (patch)
tree26166bb4df61bfcb623b46f8f3d9e746a4736e0b
parent831ed297d0a02c34664d2a5d8367fbacb899a4a2 (diff)
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
-rw-r--r--source/blender/blenkernel/intern/attribute.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc
index 495a2c82332..e9593b49047 100644
--- a/source/blender/blenkernel/intern/attribute.cc
+++ b/source/blender/blenkernel/intern/attribute.cc
@@ -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++;