Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node network subgraph editing #1750

Merged
merged 38 commits into from
Jun 2, 2024
Merged

Node network subgraph editing #1750

merged 38 commits into from
Jun 2, 2024

Conversation

adamgerhant
Copy link
Collaborator

@adamgerhant adamgerhant commented May 10, 2024

Closes #1172, closes #1765, and closes #1764. Discussion in this Discord thread.

Double-clicking nodes (except those based on proto nodes) enters their subgraph, replacing what's currently viewed in the node graph.

Todo

  • A breadcrumb trail shows which node you're in relative to the document's root network
  • Determine input/output type from compiled node network in order to display nodes without document definition.
  • Remove "Imports" field for node network, and instead store import index in each NodeInput::Network. This allows multiple nodes to use the same import field, and enables creation of the "Imports" node
  • Create a UI only "Imports" node, used for customizing the network import index for any node
  • Create a UI only "Exports" node, used for customizing the exports of a node
  • Save root node for each network, which is an Option<NodeId> default node that DocumentMetadata will use to display/update/add layers
  • Seperate NodeGraphMessages and GraphOperationMessages to ensure that tool and panel operations only affect document network, while graph UI operations only affect the selected network.
  • Add restrictions for selecting across different levels of nested networks

Issues:

  • Previews disappear when entering a nested network
  • Properties panel doesn't show information for selected layers in the document network when entering a nested network.
  • Ensure selected nodes are always in the same network
  • Auto node connection when dragging it onto a link creates an infinite loop that freezes the program
  • Auto node connection does not work between import and some node
  • Can't select import/export nodes
  • Root to export connection is doubled
  • Hide "Preview" for node not in current network, but show "Make Hidden"
  • Properties panel does not work when not in the document network
  • Fix deleting node outside of nested network
  • Remove placeholder and replace with type name from definition if it exists (Boolean operation), if not then use name of data type.
  • Set root node to None if the primary export should be used as root
  • Can't move artboard in layer panel
  • Drawing artboard when there is a layer adds the layer to primary input, not secondary
  • New artboards are not added in layer stack, they are offset to left
  • Deleting layer does not delete children
  • Export input type not correct when previewing ToArtboard protonode
  • Swapping inputs for isolated nodes breaks them
  • Copy/cut and paste is broken in document network
  • Fix "Preview"/"Stop Preview" buttons
  • Errors don't display on node graph
  • Auto reconnect does not work when when deleted node is between import node and network node
  • Deleting node between import and export causes crash since it tries to reconnect, which is currently not supported.
  • Deleting layer inside of nested network randomly deletes children
  • Copy pasting node exposes all inputs
  • Add colors for internal types such as "GraphicElement"
  • Swap node inputs for ConstructLayer and AddArtboardNode
  • Fix thumbnails not generating when entering and exiting a network
  • Copy and pasting nodes with network input retains their input.
  • Disconnecting between combine and split channels node doesn't work Connector input index skips hidden inputs #1765
  • Copy and pasting protonodes does not resolve default tagged value from compiled network. They are instead set to None. Will require a rework for copying nodes (map_ids)
  • Inserting a non manual composition node, such as the "Multiply" node between the imports and some node crashes (can't reproduce)
  • Deleting split channels that is connected to combine channels crashes
  • Fix demo artwork

Deferred:

  • Add positions for all DocumentNodeDefinition internal networks
  • Reset transform in Graph.svelte when entering nested network - will fix in next PR when moving node graph state to Rust
  • Resolved types for the Import node (which is derived from the parent node) is not saved for hidden node inputs. Nodes with manual composition also may have strange behavior Hidden inputs not added to BorrowTree inputs_source_map #1767

Change to consider:

  • If network cannot be rendered, remove all types from node graph, since they are from the last render and do not represent the current state

@adamgerhant adamgerhant linked an issue May 30, 2024 that may be closed by this pull request
Copy link
Member

@Keavon Keavon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoo, what a herculean effort you've put in with this one! What a valuable addition to making the node graph so much more complete now.

@Keavon Keavon enabled auto-merge (squash) June 2, 2024 07:57
@Keavon Keavon merged commit 6d74abb into master Jun 2, 2024
2 checks passed
@Keavon Keavon deleted the subgraph-editing branch June 2, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants