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:
authorJacques Lucke <jacques@blender.org>2022-05-31 19:52:27 +0300
committerHans Goudey <h.goudey@me.com>2022-05-31 19:58:54 +0300
commit96f20ddc1e84e0f5036ea1bdda8381f037069f77 (patch)
tree3491451249a3019e5b515da4549e6a16b5f65025 /source/blender/editors/space_node
parent610619c2031056330f174bcee590c363cb6b45fc (diff)
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
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_geometry_attribute_search.cc6
1 files changed, 4 insertions, 2 deletions
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<const GeometryAttributeInfo *> get_attribute_info_from_context(
if (const geo_log::GeometryValueLog *geo_value_log =
dynamic_cast<const geo_log::GeometryValueLog *>(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);
+ }
}
}
}