Design for the Sub-panels for Nodes, Node Groups and Geometry Nodes Modifiers #108895
- Sub-panels are to be supported both by built-in nodes, node groups and modifiers.
- Inputs and outputs can be interleaved in any order.
- Some input sockets can be outputted as well (showed in the UI as aligned input and output sockets).
- Node groups get a unified list of panels, inputs and outputs.
Take the Instances on Points node as an example. It could have a dedicated Transformations panel for Rotation and Scale.
If the Transformations panel is collapsed but there are links connected to its sockets, we don' t draw the sockets. Instead we draw the linked lines leading behind the node. This still allows those link lines to be cut and rerouted. But not for individual sockets to be inspected or disconnected.
Node Group Interface
For simple node groups the main difference is that input and output sockets are shown together in the same list:
It should be possible to add panels. In this example we draw the nested sockets with a darker background, following the visual language of sub-panels in the nodes and the modifier interface:
The goal is very similar with slight differences:
- Panels on shader nodes vs. panels in the modifier UI
- Uses ListBase, i'm using pointer array now (to avoid ListBase while still having mostly-persistent pointers)
- Naming: "section" vs "panel"
- UI in D16633 is for panels on nodes themselves using low-level
uiDefButcode. Modifier subpanels uses panels system. Would be nice to find common ground.
- Has support for sections in socket declarations. For modifier subpanels the node group interface is accessed directly.
Socket Declarations is more flexible and supports non-group node types. Node group panels avoids storing panels in every node instance, but they won't be available on regular nodes. Replacement of the bNodeTree interface data structure is an opportunity to revisit this.
- Panels on node instances requires dealing with collapsed and/or hidden panels and how to handle noodle connections to them.
- Panels on node instances requires verification of panels on load (similar to group sockets), in case a node group instance uses a linked group which changed in another file.
UPDATE: See latest version in the task description.
Task updated with the latest design, expanded to include the discussions about panels in nodes in general, not only in the modifier.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?