Nodes: reorganize node group properties UI

The initial motivation for this came from #121334, because now there
are two description inputs which look very alike and not's not obvious
at a glance where they belong to. Additionally, I find myself sometimes
looking for node properties in the group properties panel because of the same panel name.

This patch does the following changes to improve the situation:
* Reorder the node group properties and socket interface panel.
* Rename `Properties` panel to `Group` (similar to `Node` in the corresponding tab).
* Rename the `Interface` panel to `Group Sockets`.
* Add a `Name` field for the node group. This makes it even more obvious that
  one is looking at the group properties. Also it makes it possible to rename
  the group without having to go up one level to change the name in the group node.
* New layout-panel for the different usages. This only exists for geometry nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/121564
This commit is contained in:
Jacques Lucke
2024-05-08 18:03:49 +02:00
parent 5aa996e49f
commit 125afb20d3

View File

@@ -891,7 +891,7 @@ class NODE_PT_node_tree_interface(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
bl_category = "Group"
bl_label = "Interface"
bl_label = "Group Sockets"
@classmethod
def poll(cls, context):
@@ -957,7 +957,7 @@ class NODE_PT_node_tree_properties(Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
bl_category = "Group"
bl_label = "Properties"
bl_label = "Group"
@classmethod
def poll(cls, context):
@@ -978,15 +978,20 @@ class NODE_PT_node_tree_properties(Panel):
layout.use_property_split = True
layout.use_property_decorate = False
if group.bl_idname == "GeometryNodeTree":
col = layout.column()
col.prop(group, "is_modifier")
col.prop(group, "is_tool")
layout.prop(group, "name", text="Name")
if group.asset_data:
layout.prop(group.asset_data, "description", text="Group Description")
layout.prop(group.asset_data, "description", text="Description")
else:
layout.prop(group, "description", text="Group Description")
layout.prop(group, "description", text="Description")
if group.bl_idname == "GeometryNodeTree":
header, body = layout.panel("group_usage")
header.label(text="Usage")
if body:
col = body.column(align=True)
col.prop(group, "is_modifier")
col.prop(group, "is_tool")
# Grease Pencil properties
@@ -1044,9 +1049,9 @@ classes = (
NODE_PT_geometry_node_tool_mode,
NODE_PT_geometry_node_tool_options,
NODE_PT_node_color_presets,
NODE_PT_node_tree_properties,
NODE_MT_node_tree_interface_context_menu,
NODE_PT_node_tree_interface,
NODE_PT_node_tree_properties,
NODE_PT_active_node_generic,
NODE_PT_active_node_color,
NODE_PT_texture_mapping,