From 96f20ddc1e84e0f5036ea1bdda8381f037069f77 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 31 May 2022 18:52:27 +0200 Subject: Geometry Nodes: Don't allow UI attributes as modifier field inputs This is an extension of 4669178fc3786e1, applying the same changes to attributes chosen in the field inputs of the geometry nodes modifier. If a UI/internal attribute is used, the attribute name button will have a red alert. Adding a disabled hint is currently a bit more complex. Also hide UI attributes in attribute search for the named attribute node. Part of D14934 --- source/blender/editors/space_node/node_geometry_attribute_search.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/node_geometry_attribute_search.cc b/source/blender/editors/space_node/node_geometry_attribute_search.cc index 9c0172cfabf..ed981603293 100644 --- a/source/blender/editors/space_node/node_geometry_attribute_search.cc +++ b/source/blender/editors/space_node/node_geometry_attribute_search.cc @@ -82,8 +82,10 @@ static Vector get_attribute_info_from_context( if (const geo_log::GeometryValueLog *geo_value_log = dynamic_cast(value_log)) { for (const GeometryAttributeInfo &attribute : geo_value_log->attributes()) { - if (names.add(attribute.name)) { - attributes.append(&attribute); + if (bke::allow_procedural_attribute_access(attribute.name)) { + if (names.add(attribute.name)) { + attributes.append(&attribute); + } } } } -- cgit v1.2.3