From a0f0a4dd49f7d4a4473f7dc68c0941a6ca5f8cfd Mon Sep 17 00:00:00 2001 From: Falk David Date: Thu, 27 Jun 2024 19:20:04 +0200 Subject: [PATCH] Cleanup: Remove `BKE_attribute_allow_procedural_access` This function was already replaced by `bke::allow_procedural_attribute_access`. Removes the rest of the usages. Pull Request: https://projects.blender.org/blender/blender/pulls/123852 --- source/blender/blenkernel/BKE_attribute.h | 1 - source/blender/blenkernel/intern/attribute.cc | 7 +------ source/blender/makesrna/intern/rna_attribute.cc | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h index 174d217695b..4d6405355eb 100644 --- a/source/blender/blenkernel/BKE_attribute.h +++ b/source/blender/blenkernel/BKE_attribute.h @@ -74,7 +74,6 @@ class AttributeOwner { /* Attributes. */ bool BKE_attributes_supported(const AttributeOwner &owner); -bool BKE_attribute_allow_procedural_access(const char *attribute_name); /** * Create a new attribute layer. diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index d099d9eeb70..0c9b14391f6 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -199,11 +199,6 @@ bool BKE_attributes_supported(const AttributeOwner &owner) return false; } -bool BKE_attribute_allow_procedural_access(const char *attribute_name) -{ - return blender::bke::allow_procedural_attribute_access(attribute_name); -} - static bool bke_attribute_rename_if_exists(AttributeOwner &owner, const char *old_name, const char *new_name, @@ -787,7 +782,7 @@ CustomDataLayer *BKE_attributes_active_get(AttributeOwner &owner) CustomDataLayer *layer = &customdata->layers[i]; if (CD_MASK_PROP_ALL & CD_TYPE_AS_MASK(layer->type)) { if (index == active_index) { - if (BKE_attribute_allow_procedural_access(layer->name)) { + if (blender::bke::allow_procedural_attribute_access(layer->name)) { return layer; } return nullptr; diff --git a/source/blender/makesrna/intern/rna_attribute.cc b/source/blender/makesrna/intern/rna_attribute.cc index 2a6e9f61141..3a2a1e6590e 100644 --- a/source/blender/makesrna/intern/rna_attribute.cc +++ b/source/blender/makesrna/intern/rna_attribute.cc @@ -314,7 +314,7 @@ static int rna_Attribute_domain_get(PointerRNA *ptr) static bool rna_Attribute_is_internal_get(PointerRNA *ptr) { const CustomDataLayer *layer = (const CustomDataLayer *)ptr->data; - return !BKE_attribute_allow_procedural_access(layer->name); + return !blender::bke::allow_procedural_attribute_access(layer->name); } static bool rna_Attribute_is_required_get(PointerRNA *ptr)