Skip to content

Add layer node chains, import/export edge connectors, and refactor graph editing to go thru a NodeNetworkInterface #1794

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

Merged
merged 68 commits into from
Aug 4, 2024

Conversation

adamgerhant
Copy link
Collaborator

@adamgerhant adamgerhant commented Jun 21, 2024

Closes #1892, closes #1891, closes #1893

Moves NodeNetwork to a private field and creates an API for modifying the network. This API contains the various functions for manipulating the network, automatically organizing it, and caching.

Todo

  • Zoom to fit all is broken
  • Add UI distinction between primary selection and all other selections
  • Fix lock/hide icons
  • Can't move layers
  • Shift selecting multiple layers does not visually expand the selection box to include all layers.

Crashes

  • If artboard is not a layer and a shape is drawn
  • Deleting all nodes and a shape is drawn
  • Moving layer to bottom of stack in layer panel
  • Select layer, ctrl c, ctrl v, move layer, ctrl z, memory access out of bounds crash
  • Toggling layer to node in nested network

Deferred:

  • Move wire paths to Rust to fix disconnecting, display lines as vertical/horizontal
  • Remove node_graph_to_viewport and derive with calculate_offset_transform from the node_graph_ptz.
  • Automatically snap the viewport to keep export side bars aligned with the grid
  • Add x offset for top of child stack (be able to move stacks left from their parent, but not overlap the wire)
  • Automatically add nodes into chain if they are vertically aligned, within 3 spaces, and no additional primary outputs
  • Only snap layers on the x axis when converting to stack position
  • Store document metadata structure as transient metadata
  • Fix deleting previewed nodes
  • Add vec of network types to NodeNetwork, rather than storing type for each NodeInput::Network
  • Drag selection in node graph runs document and checks for artwork intersections on every frame
  • "To Artboard" has incorrect displayed types
  • Node and wire culling in the graph
  • Toggling layer to node which has an upstream chain breaks the graph.

@adamgerhant adamgerhant force-pushed the node-network-interface branch from 3677b86 to 16229ae Compare July 7, 2024 07:42
@adamgerhant adamgerhant force-pushed the node-network-interface branch from 770988f to 8efa74d Compare July 12, 2024 21:32
@adamgerhant adamgerhant force-pushed the node-network-interface branch from 8efa74d to f69b841 Compare July 12, 2024 21:36
@Keavon
Copy link
Member

Keavon commented Aug 4, 2024

It appears to me that the color change for selected layers when either panel becomes the active or inactive panel isn't working anymore.

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.

Yet another Herculean development completed. You're on fire! This edited like 1/8 of our entire codebase 🤯. Way to go!

@Keavon Keavon changed the title Create NodeNetworkInterface to handle all NodeNetwork modifications Add layer node chains, import/export edge connectors, and refactor graph editing to go thru a NodeNetworkInterface Aug 4, 2024
@Keavon Keavon merged commit 0dbbabe into master Aug 4, 2024
2 checks passed
@Keavon Keavon deleted the node-network-interface branch August 4, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants