Adam Gerhant
24c6281644
Fix regression with migration code changed in node UI wire refactor ( #2840 )
...
Fixes
2025-07-06 14:34:43 -07:00
Adam Gerhant and Keavon Chambers
f57163c795
Port node graph wires to the backend and improve graph UI performance ( #2795 )
...
* Improve node graph performance
* Fix wire bugs, add type default for properties.
* Grid aligned wire paths
* remove type source
* node from exposed input
* Refresh wires on preference change
* merge fixes
* Code review
* Fix names
* Code review
* Fix wires on redo/undo
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2025-07-04 22:53:37 -07:00
Adam Gerhant and Keavon Chambers
1f7a9188ba
Improve the speed of SVG importing due to node positioning ( #2625 )
...
Fix slow svg import
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2025-04-30 03:38:09 -07:00
Adam Gerhant
ee6a842a6b
Fix dragging a node onto a secondary input's wire not working ( #2583 )
...
Fix dragging onto wire
2025-04-16 01:52:15 -07:00
Adam Gerhant
cbb535b6b5
Fix incorrect Properties panel widget types for proto nodes ( #2323 )
...
Fix incorrect property types for protonodes
2025-02-27 21:22:02 -08:00
Adam Gerhant
419a95e73b
Fix unresolved types in graph wires when repeatedly undoing and redoing ( #2283 )
...
fix unresolved types when repeatedly undoing and redoing
2025-02-15 06:47:48 +00:00
Adam Gerhant and Keavon Chambers
408f9bffa1
Fix regressions from #2105 (more control over subgraph imports/exports handling) ( #2213 )
...
* Fix regressions
* Fix copy to points properties
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2025-01-26 20:19:11 +00:00
Adam Gerhant and Keavon Chambers
eec0ef761c
Polish user-created subgraph nodes: imports in the Properties panel; reorder/delete/rename imports/exports ( #2105 )
...
* Remove imports/exports
* WIP: Autogenerated properties
* WIP: Input based properties
* WIP: Hashmap based input overrides
* Migrate noise pattern node to input properties
* Reorder exports
* Continue migrating properties
* WIP: Improve reorder exports
* Automatically populate all input properties for sub networks
* Complete reorder import and export
* Add widget override to node macro
* Migrate assign colors to input based properties
* WIP: Full node property override
* Node based properties override for proto nodes
* Migrate all node properties to be input based
* Rename imports/exports
* improve UI
* Protonode input valid implementations
* Valid type list
* Small formatting fixes
* Polishing small issues
* Document upgrade
* fix tests
* Upgrade noise pattern node
* remove console log
* Fix upgrade script for Noise Pattern
* Improve the Properties panel representation for graphical data
* Re-export demo art
* Code review
* code review improvements
* Cleanup for node properties overrides
* Reexport demo art
* Fix clippy lints
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2025-01-20 21:13:14 -08:00
Adam Gerhant and Keavon Chambers
4250f291ab
Add merging nodes into a subgraph with Ctrl+M and basic subgraph signature customization ( #2097 )
...
* Merge nodes
* Fix bugs/crashes
* WIP: Debugging
* Fix bugs, add button
* Add imports/exports
* Improve button
* Fix breadcrumbs
* Fix lints and change shortcut key
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-11-12 14:27:42 -08:00
adamgerhant
c7b08246c2
Allow the Pen tool to connect layers by their endpoints, merging into a single layer ( #2076 )
...
* Merge vector data layers
* Fix early return
* Fix layer space multiplication error
* Recalculate positions when changing layer space
* Add transform node
* Remove pen tool layer state
2024-11-01 12:19:46 -07:00
adamgerhant
ff8fec6eca
Allow the Path tool to edit an upstream path even if there's a type conversion midway ( #2055 )
...
Remove type check when iterating upstream
Convert to doc comment
2024-10-26 18:39:48 +00:00
adamgerhant
fd20d51e85
Fix various crashes and bugs ( #2075 )
...
* Fix offset brush tool
* Fixes
2024-10-25 16:54:37 -07:00
adamgerhant
6b1356fe13
Allow multiple top output wires to come from layers ( #2049 )
...
* Allow multiple outputs from layer
* Stable Ids for Flatten Vector Elements
* Clippy
2024-10-25 22:32:31 +00:00
adamgerhant and Keavon Chambers
e09f5ecaec
Make Copy to Points and (Circular) Repeat and nodes output group data, and add flattening nodes ( #2011 )
...
* Output group from repeat, add flatten vector elements
* Fix tests
* Fix demo artwork
* Output group from copy to points, add repeat for graphic groups, fix editor freeze on render fail
* Restore painted dreams
* WIP: Fix demo artwork
* Fix demo artwork, add ungroup node
* Incorrect scaling
* fix test
* Fix demo art
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-10-14 12:39:28 -07:00
adamgerhant and Keavon Chambers
dc46959274
Fix double clicking anchor to convert between smooth and sharp ( #2023 )
...
* Buffer after undo
* Quick thumbnail fix while I'm thinking about it
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-10-07 13:13:52 -07:00
adamgerhant and Keavon Chambers
20470b566b
Fix many regressions introduced mostly in #1946 ( #1986 )
...
* Fix text tool
* Implement buffering to fix freehand tool
* Fix tools
* Fix clippy lints
* Small fixes
* Move vector modify back to Monitor nodes
* Code review
* Fix abort
* Fix svg import
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-09-26 15:37:03 -07:00
ca0d102296
Fix click targets (in, e.g., the boolean node) by resolving footprints from render output ( #1946 )
...
* add NodeId (u64) and Footprint to Graphic Group
* Render Output footprints
* Small bug fixes
* Commented out render output click targets/footprints
* Run graph when deleting
* Switch to node path
* Add upstream clicktargets for boolean operation
* Fix boolean operations
* Fix grouped layers
* Add click targets to vello render
* Add cache to artwork
* Fix demo artwork
* Improve recursion
* Code review
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev >
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-09-16 01:26:59 +00:00
adamgerhant and Keavon Chambers
70dacac474
Refactor navigation metadata ( #1956 )
...
* Fix path tool select
* Refactor rounded edge distance
* comment
* Fix demo artwork
* Fix comments
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-09-05 19:53:37 +00:00
adamgerhant
19541c9684
Fix broken SVG importing and crash when exporting ( #1953 )
...
* Fix importing SVG and crash when exporting
* Code improvements, prevent entering network after drag
2024-09-03 06:54:51 +00:00
adamgerhant and Keavon Chambers
9adc640f19
Improve layer positioning in graph upon reordering; improve history system; add selection history ( #1945 )
...
* Improve layer positioning
* Collapse space when deleting
* Improve moving layers in layer panel
* Improved transactions
* Selection history
* Code review
* Select previous selection when aborting
* Fix crash and artboard select
* Add mouse forward/back button selection history bindings
Code review
* Menu buttons
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-09-01 02:34:18 -07:00
adamgerhant and Keavon Chambers
78337f9b8e
Add shifting of layers in stacks as blocks that collide and bump other layers/nodes ( #1940 )
...
* Shift nodes as blocks
* Implement rubber banding
* Improve upstream locking when shifting layers
* WIP: Reworked shifting
* WIP: Reworked node shifting
* Finish shifting
* Fix demo artwork
* Code review
* Right click to end shift
* Improve rubber banding
* Fix clippy issues
* Skip collision for intersecting nodes
* Rubber banding bug fix
* Fix ctrl+delete node in chain
* Grip drag
* Fix layer width
* Add icon to frontend for the solo drag grip
* Reconnect during ctrl+delete
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-08-22 01:56:32 -07:00
adamgerhant and Keavon Chambers
33739b9ad4
Separate the Merge node from the Boolean Operation node ( #1933 )
...
* Rework boolean operation node
* Set Boolean Operation name for layer
* Remove memoize
* Update both demo artworks that use booleans
* Delete dead code, rename input connectors
* Remove more dead code
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-08-16 00:36:07 +00:00
adamgerhant and Keavon Chambers
2bd213f1aa
Improve layer panel positioning for upstream nodes ( #1928 )
...
* Improve layer panel positioning for upstream nodes
* highlight parents
* Final improvements
* Fill for selection box, bug fixes
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-08-14 03:27:42 -07:00
adamgerhant and Keavon Chambers
193f757c45
Add grid snapping to graph imports/exports; improve layer panel drag into/between insertion; better preserve graph space on reordering ( #1911 )
...
* Fix disconnecting root node when previewing
* Final previewing fixes
* Improve positioning when moving layer to stack
* Improve layer panel
* Import/Export edge grid snapping
* Fix layer ordering and positioning
* Small bug fixes and improvements
* Fix copy and paste position
* Nit
* Align imports/edges when using scrolling
* Fix misaligned exports in demo artwork
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-08-11 00:30:14 +00:00
60707c0369
Add colors to all nodes in a graph, even if disconnected, and properly display hidden network imports ( #1921 )
...
* Get output/input types by iterating to proto node. Fix types when undoing/redoing
* Remove unused code
* Fix types not updating when modified
* Improve code quality
* Improve proto node type lookup
* Nits
* Fix crash when adding Extract
---------
Co-authored-by: dennis@kobert.dev <dennis@kobert.dev >
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-08-10 15:27:15 -07:00
adamgerhant
8041b1237c
Fix regressions from network interface PR ( #1906 )
...
* Fix regressions
* Remove unnecessary graph render in box selection
* Improve stack positioning
* Store layer stacks as absolute position
* Improve automatically creating chains
* Improve group selection
* Increase horizontal layer spacing by 1
* Fix export crash and demo artwork
* Improve inserting node onto wire, fix spline crash
* Remove comment
2024-08-07 01:03:12 -07:00
0dbbabe73e
Add layer node chains, import/export edge connectors, and refactor graph editing to go thru a NodeNetworkInterface ( #1794 )
...
* WIP: NodeNetworkInterface
* Organize ModifyInputsContext to use network interface
* Improve ClickTarget and Position state
* Rework ClickTarget state
* Continue fixing NodeGraphMessageHandler
* Restructure network_metadata
* Final(?) NodeNetworkInterface struct
* Final(??) NodeNetworkInterface
* Final(???) NodeNetworkInterface. Separated persistent and transient data
* Final NodeNetworkInterface data structure. Implemented all basic getters
* Continue migrating functionality to network interface
* Migrate all NodeGraphMessage's to use network interface
* Fix all helper functions in NodeGraphMessageHandler
* Move document metadata to network interface, remove various cached fields
* Move all editor only NodeNetwork implementations to NodeNetworkInterface
* Fix all DocumentNodeDefinitions
* Rework and migrate GraphOperationMessages to network interface
* Continue migration to NodeNetworkInterface
* Save point before merging master
* Fix all errors in network_interface
* 850 -> 160 errors
* Fix all errors :D
* Render default document
* Visualize click targets
* merge conflicts
* Cache transient metadata separately, store entire interface in document history
* Start migration to storing selected nodes for each network
* Remove selected nodes from document message handler
* Move outward wires and all nodes bounding box to transient metadata
* Fix connecting/disconnecting nodes
* Layer stack organization for disconnecting/connecting nodes
* Basic chain locking
* Improve chain positioning
* Add copy/pasting
* Move upstream nodes on shift+drag
* merge conflict fixes
* Improve Graph.svelte code quality
* Final improvements to Graph.svelte
* Fix layer panel
* Performance optimizations
* Bug fixes and derived PTZ
* Chain organization improvement and bug fixes
* Bug fixes, remove all warnings
* Automatic file upgrade
* Final code review
* Fix editor tests
* Fix compile errors
* Remove select tool intersection check when panning
* WIP: Import/Exports
* Fix JS issues
* Finish simplified import/export UI
* Import/Export viewport edge UI
* Remove minimum y bound on import/export ports
* Improve performance while panning graph
* cargo fmt
* Fix CI code build
* Format the demo artwork graph with chains
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
Co-authored-by: dennis@kobert.dev <dennis@kobert.dev >
2024-08-04 06:47:13 -07:00
adamgerhant and Keavon Chambers
9d749c49fb
Add a stack-based Boolean Operation layer node ( #1813 )
...
* Multiple boolean operation node
* Change boolean operation ordering
* Complete layer boolean operation node
* Automatically insert new boolean operation node
* Remove divide operation
* Fix subtract operations
* Remove stack data from boolean operation properties
* Fix images and custom vectors
* Code cleanup
* Use slice instead of iter to avoid infinite type recursion
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-07-10 02:12:55 -07:00
adamgerhant and Keavon Chambers
f4e3e5ab2a
Add draggable upstream nodes feature ( #1812 )
...
* drag upstream nodes, fix node deselection
* Ignore bottom layer inputs
* Fix amplified movement
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-07-09 12:16:50 +00:00
adamgerhant and Keavon Chambers
84ac2e274e
Code cleanup after migrating node graph interaction to the backend ( #1790 )
...
* Cleanup transforms and click targets
* Improve click target caching
* Fix click target bugs
* Add auto panning
* update_modified_click_targets
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-06-20 23:11:41 -07:00
adamgerhant
d8973ec8da
Fix Poisson-Disk Points node transform of input shape ( #1784 )
...
Fix poisson-disk, node gap spacing
2024-06-15 15:16:12 -07:00
adamgerhant and Keavon Chambers
02360c7bc8
Migrate node graph UI interaction from frontend to backend ( #1768 )
...
* Click node using click targets based
* Display graph transform based on state stored in Rust, fix zoom and pan.
* Migrate node selection logic
* Move click targets and transform to NodeNetwork
* Keep click targets in sync with changes to node shape
* Click targets for import/export, add dragging
* Basic wire dragging
* complete wire dragging
* Add node selection box when dragging
* Fix zoom operations and dragging nodes
* Remove click targets from serialized data, fix EnterNestedNetwork
* WIP: Auto connect node when dragged on wire
* Finish auto connect node when dragged on wire
* Add context menus
* Improve layer width calculations and state
* Improve context menu state, various other improvements
* Close menu on escape
* Cleanup Graph.svelte
* Fix lock/hide tool tip shortcuts
* Clean up editor_api.rs, fix lock/hide layers
* Start transferring network and node metadata from NodeNetwork to the editor
* Transfer click targets to NodeGraphMessageHandler
* Fix infinite canvas
* Fix undo/redo, scrollbars, and fix warnings
* Unicode-3.0 license and code cleanup
* License fix
* formatting issue
* Enable DomRect
* Fix layer move crash
* Remove tests
* Ignore test
* formatting
* remove white dot
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-06-15 08:55:33 -07:00
adamgerhant and Keavon Chambers
6d74abb4de
Node network subgraph editing ( #1750 )
...
* Breadcrumb visualization, nested network consistency, create definitions for Merge internal nodes
* Add index to network inputs, remove imports usage from flatten network
* Replace NodeOutput with NodeInput::Node
* Fully remove imports field, remove unnecessary identity nodes, move Output node to encapsulating network
* Replace previous_outputs with root_node, fix adding artboard/layer to empty network
* Import/Export UI nodes
* Display input/output types dynamically from compiled network
* Add LayerNodeIdentifer::ROOT_PARENT
* Prevent .to_node() on ROOT_PARENT
* Separate NodeGraphMessage and GraphOperationMessage
* General bug fixes with nested networks
* Change layer color, various bug fixes and improvements
* Fix disconnect and set node input for proto nodes and UI export node
* Dashed line to export for previewed node
* Fix deleting proto nodes and nodes that feed into export
* Allow modifications to nodes outside of nested network
* Get network from Node Id parameter
* Change root_node to previous_root_node
* Get TaggedValue from proto node implementation type when disconnecting
* Improve preview functionality and state
* Artboard position and delete children fix
* Name inputs/outputs based on DocumentNodeDefinition or type, fix new artboard/layer insertion
* replace "Link" with "Wire", adjust previewing
* Various bug fixes and improvements
* Modify Sample and Poisson-Disk points, fix incorrect input index and deleting currently viewed node
* Open demo artwork
* Fix opening already upgraded documents and refactor FrontendGraphDataType usages
* Fix deleting within network and other bugs
* Get default node input from compiled network when copying, fix previews, tests, demo artwork
* Code cleanup
* Hide EditorApi and add a comment describing unresolved Import node input types
* Code review
* Replace placeholder ROOT_PARENT NodeId with std::u64::MAX
* Breadcrumb padding
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-06-02 08:01:56 +00:00
adamgerhant
cce1bc644e
Fix artboards not being included in Export menu's bounds list ( #1748 )
...
Show artboards when exporting
2024-05-09 05:08:02 +00:00
adamgerhant and Keavon Chambers
bc33eabc3c
Add grid color customization and choice to display as dots ( #1743 )
...
* dot grid
* fix warning: unreachable pattern
* grid color select
* add color for all grid types
* Dot grid checkbox and remove prefixed Color functions
* Display dot grid as grid aligned pixels
* Dashed line comment
* Code review and UI design widget placement updates
* Isometric dotted grid
* Early return when cos = 0
* Add spacing, x offset, and color to dot grids
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-05-08 21:36:15 +00:00
adamgerhant
14262e1527
Fix duplicate selection when holding Alt and dragging with Select tool ( #1739 )
...
Fix duplicate selection when holding alt and dragging with select tool
2024-05-06 18:33:58 -07:00
adamgerhant and Keavon Chambers
4c3856833b
Code cleanup and refactor for generalized layers ( #1738 )
...
* Move functions to messages to fix undo bugs for UnGroup and Group
* Copy+Paste for generalized layer nodes
* Fix MoveSelectedLayersTo and GroupSelectedLayers by extracting functions into messages
* Fix tests, replace FrontendMessage:TriggerPaste with PortfolioMessage::PasteIntoFolder
* Formatting
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-05-04 22:11:48 -07:00
8d83fa7079
Generalize layers as merge nodes to enable adjustment layers ( #1712 )
...
* WIP, backward traversal issues
* Fix some tool issues
* Remove debugging
* Change some indices
* WIP: new artboard node
* WIP: add artboard node
* WIP: Artboard node and create_artboard
* WIP: Artboard node implementation complete
* WIP: Artboards input for output node
* Complete Artboard node
* Generalize LayerNodeIdentifier, monitor_nodes support for Artboard node, adjust ResizeArtboard/ClearArtboards, move alias validation to Rust
* Fix misaligned artboard click targets
* Generalize/clarify create_layer and insert_between
* non-negative dimensions for resize_artboard
* Show artboards in layer panel
* Generalize create_layer for layer output node
* Generalize delete_layer/delete_artboard to NodeGraphMessage::DeleteNodes. Fixed upstream flow Iter
* remove old primary_input function
* Vertical node visuals, remove is_layer function, rename Layer node to Merge node, toggle display as layer
exposed_value_count type fix
Vertical node visuals, remove is_layer function, rename Layer node to Merge node, toggle display as layer
* Fix demo artwork
* Layer display context menu
* Automatically select artboard, fix warnings
* Improvements to context menu and layer invariant enforcement
* Remove display_as_layer and update load_structure
* Improve load_structure to show more layers, improve FlowIter, improve layer naming, layer rearrangement validation.
* Clean up demo artwork using generalized layers
* Improve design of Layers panel and graph nodes
* MoveSelectedLayersTo rewrite to support generalized layer nodes
* Include artboards in deepest_common_ancestor, fix resize_artboard/delete_artboard, sync artboard tool to layer panel
* MoveSelectedLayersTo adjustments
* Sync non layer node visibility with metadata
* Include non layer nodes when moving/creating layer
* Fix group layers and get_post_node_with_index
* Include non layer nodes in UngroupSelectedLayers
* GroupSelected for all selected nodes, UnGroupSelected position adjustments
* Add grouping for layers in different folders
* Fix hidden layers
* Prevent node from connecting to itself, fix undo automatic node insertion,
* Fix undo CreateEmptyFolder, fix grouping nested layer nodes
* Formatting
* Remove test and check if node is layer from network
* Fix undo group layers
* Check off roadmap
* MoveUpstreamSiblingsToChild adjustments
* Replace tabs with spaces, remove mut from argument
* Final code review pass
---------
Co-authored-by: 0hypercube <0hypercube@gmail.com >
Co-authored-by: Keavon Chambers <keavon@keavon.com >
2024-04-30 23:03:42 -07:00