diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-28 16:39:30 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-28 16:39:30 +0300 |
commit | 0ad73bb9655f04afb5ad56174d8fb416cded3e4c (patch) | |
tree | e427b3514ee5165843f9a5dc2724d85c92fd215a /release/scripts | |
parent | b0e47ffdcf13cd00c42e6cab4c3556679ad9fea4 (diff) |
Geometry Nodes: Add default attribute name to field inputs/outputs
Geometry node group inputs and outputs get a new property that controls
the attribute name used for that field input/output when assigning the
node group to a modifier for the first time. If the default name is assigned
to an input, the default "Use attribute name" is true .
In order to properly detect when a node group is first assigned,
the modifier now clears its properties when clearing the node group.
Ref T96707
Differential Revision: https://developer.blender.org/D14761
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index cc673a8bc39..e105b07ec53 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -797,8 +797,10 @@ class NodeTreeInterfacePanel: active_socket.bl_socket_idname.startswith(prefix) for prefix in field_socket_prefixes ) - if in_out == 'OUT' and is_field_type: - layout.prop(active_socket, "attribute_domain") + if is_field_type: + if in_out == 'OUT': + layout.prop(active_socket, "attribute_domain") + layout.prop(active_socket, "default_attribute_name") active_socket.draw(context, layout) |