Commit graph

13 commits

Author SHA1 Message Date
Dennis Kobert
05bc282326 Fix pasting images 2023-05-26 21:18:14 +02:00
Dennis Kobert
699d9add7f Reenable more nodes 2023-05-26 21:18:14 +02:00
Dennis Kobert
9ab8ba18a4 Simplify lifetims for node macro + make node macro more modular 2023-05-26 21:18:13 +02:00
Dennis Kobert
b62ce1d03c Make node graph execution async
Make node macro generate async node implementations

Start propagating async through the node system

Async checkpoint

Make Any<'i> Send + Sync

Determine node io type using panic node

Fix types for raster_node macro

Finish porting node registry?

Fix lifetime errors

Remove Send + Sync requirements and start making node construction async

Async MVP

Fix tests

Clippy fix
2023-05-26 21:18:13 +02:00
0HyperCube
ef93f8442a Migrate text layers to nodes (#1155)
* Initial work towards text to node

* Add the text generate node

* Implement live edit

* Fix merge error

* Cleanup text tool

* Implement text

* Fix transforms

* Fix broken image frame

* Double click to edit text

* Fix rendering text on load

* Moving whilst editing

* Better text properties

* Prevent changing vector when there is a Text node

* Push node api

* Use node fn macro

* Stable ids

* Image module as a seperate file

* Explain check for "Input Frame" node

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-04-27 03:07:43 +01:00
Dennis Kobert
76c754d38a Simplify node trait definition (#1146)
* Simplify node trait
2023-04-17 23:42:22 +02:00
0HyperCube
ed6140b4a7 Brush tool live preview (#1116)
* Disable vector preview for brush tool

* Fix brush preview

* Fix warping

* Left and right square brackets to change size

* Add linear interpolation

* Modfiy existing selected brush layer

* Resolve warnings

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-04-12 18:50:42 +01:00
Dennis Kobert
589ff9a2d3 Implement the Brush tool (#1099)
* Implement Brush Node

* Add color Input

* Add VectorPointsNode

* Add Erase Node

* Adapt compilation infrastructure to allow non Image Frame inputs

* Remove debug output from TransformNode

* Fix transform calculation

* Fix Blending by making the brush texture use associated alpha

* Code improvements and UX polish

* Rename Opacity to Flow

* Add erase option to brush node + fix freehand tool

* Fix crash

* Revert erase implementation

* Fix flattening id calculation

* Fix some transformation issues

* Fix changing the pivot location

* Fix vector data modify bounds

* Minor fn name cleanup

* Fix some tests

* Fix tests

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
2023-04-11 10:35:21 +02:00
0HyperCube
a2046a51b1 Add basic vector nodes (#1059)
* Add some derives

* Allow node_fn with mutable inputs

* Add basic vector nodes

* Revert elipse tool changes

* Fix the elipse tool again

* Change spacer width

* Bubble serde feature in graph craft

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-02 21:54:23 +00:00
Dennis Kobert
620540d7cd Incremental compilation and stable node IDs (#977)
* Generate stable node ids

* checkpoint

* Implement borrow tree

* Add eval function on borrow tree

* Refactor Node trait to fix lifetime issues

* Compiler infinite loop

* Impl compose pair

* Transition to double lifetime on trait

* Change node trait to use a generic arg for the input

* Start adapting node_macro

* Migrate more nodes to new macro

* Fix raster tests

* Port vector nodes

* Make Node trait object safe

* Fix FlatMapResultNode

* Translate most of gstd

* Fix DowncastBothNode

* Refactor node trait once again to allow for HRTB for type erased nodes

* Start working on type erased nodes

* Try getting DowncastBothNode to work

* Introduce Upcasting node + work on BorrowTree

* Make enough 'static to get the code to compile

* Transition DynamicExecutor to use borrow tree

* Make Compose Node use HRTB's

* Fix MapResultNode

* Disable blur test

* Add workaround for Composing type erased nodes

* Convert more nodes in the node_registry

* Convert more of the node_registry

* Add update tree fn and hook up to frontend

* Fix blur node

* Implement CacheNode

* Make frontend use graph compiler

* Fix document_node_types type declaration for most nodes

* Remove unused imports

* Move comment down

* Reuse nodes via borrow tree

* Deprecate trait based value in favor of TaggedValue

* Remove unsafe code in buffer creation

* Fix blur node

* Fix stable node id generation

* Fix types for Image adjustment document nodes

* Fix Imaginate Node

* Remove unused imports

* Remove log

* Fix off by one error

* Remove macro generated imaginate node entry

* Create parameterized add node

* Fix test case

* Remove link from layer_panel.rs

* Fix formatting
2023-02-07 20:06:24 +01:00
Keavon Chambers
66e8325362 Update project readme and MSRV 2023-01-24 01:33:30 -08:00
0HyperCube
2bcc3d3baf Improve history states (#932)
* Add some more history states

* Fix undo whilst drawing

* Paste image history

* Toggle output and preview history

* Code review nits

* Remove extra '{'

* Fix typo

* Fix about.toml

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-01 22:02:44 +00:00
0HyperCube
2732492307 Make Imaginate into a node (#878)
* Simplify document node input defenitions

* Remove imaginate layer

* Imaginate node properties

* Fix serde feature gate

* Add Proc Macro for Protonode implementation

* Fix incorrect type

* Add cargo.toml metadata

* Send imaginate params to frontend

* Fix image_creativity range

* Finish imaginate implementation

* Fix the imaginate draw tool

* Remove node-graph/rpco-macro

* Cargo fmt

* Fix missing workspace member

* Changes to the resolution

* Add checkbox for Imaginate auto resolution; improve Properties panel layouts

And fix bugs in panel resizing

* Implement the Rescale button

* Reorder imports

* Update Rust deps

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-20 22:51:38 +00:00