Commit Graph

32 Commits

Author SHA1 Message Date
Brendan Allan
0d8be71426 Groundwork for integrating Specta (#949)
* add derive(specta::Type)

* use specta from git

* introduce Uuid type

* remove unnecessary specta::Type

* document export_types test

* upgrade Specta
The previous Specta branch had some hacks that were just for this project. They have all been converted into proper features so they can be merged into main.

* remove some unnecessary specta::Type uses

* add MessageDiscriminantDef explanation

* manually export types with specta

* rename 'specta.rs' to 'export_types.rs'

* rename 'export_types' to 'generate_ts_types'

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-01-28 22:29:38 -08:00
0HyperCube
41bb1a8170 Replace the image layer type with an Image node (#948)
* Use builder pattern for widgets

* Arguments to new function

* Add node graph when dragging in image

* Fix duplicate import

* Skip processing under node graph frame if unused

* Reduce node graph rerenders

* DUPLICATE ALL frontend changes into other frontend

* DUPLICATE more changes to another frontend

* Code review

* Allow importing SVG files as bitmaps

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-27 02:01:09 -08:00
Keavon Chambers
cc7ec9409d Clean up imports and warnings in Rust code 2023-01-13 13:14:49 -08:00
Dennis Kobert
a492e7a4bb Restructure GPU compilation execution pipeline (#903)
* Restructure gpu compilation execution pipeline

* Add compilation server/client infrastructure

* Add wgpu executor
2022-12-31 02:52:04 +01:00
0HyperCube
c229883780 Make copying/duplicating nodes not preserve the incoming connection (#917)
* Remove wires to nodes outside of copy

* Fix logic error

* Shift pasted nodes

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 12:00:53 -08:00
0HyperCube
b660df84ba Node 'Disable' and 'Preview' UX improvements (#918)
* Don't allow disabling input or output nodes

* Shortcuts to show and preview node

* Update preview tooltip and label

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 11:38:35 -08:00
Keavon Chambers
d66f09da08 Rename some Imaginate parameters 2022-12-27 14:30:54 -08:00
0HyperCube
01931939ff Add preview and disable buttons for nodes (#905)
* Add preview and disable button

* Fix tests

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-25 02:28:18 -08:00
0HyperCube
537dbf266a Add drag to connect nodes (#901)
* Add drag to connect nodes

* Clean up node graph code

* Close node list with escape or click

* Check if line is contained within box

* Shift the nodes

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-22 21:14:21 +00:00
0HyperCube
55d5dbaf52 Better downcast panics (#898) 2022-12-22 09:27:55 +00:00
0HyperCube
9973e17479 Node code cleanup for vector data, and add node creation guide (#895)
* Cleanup Vector Nodes

* Add the creating nodes guide

* Rename guide as readme so GitHub shows it by default

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-21 11:50:40 -08:00
0HyperCube
80d39c2be7 Fix Imaginate flicker during generation (#891)
Fix imaginate flicker

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-21 10:09:01 +00:00
0HyperCube
7a752b93f9 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 14:51:38 -08:00
0HyperCube
11b6147719 Nested networks UI (#885)
* Initial UI for nested nodes

* Clean up deleting nodes

* Print address of nested network

* Add exiting network message

* Implement the breadcrumb trail

* Remove whitespace

* Fix double click not registering in Chromium

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-17 15:38:29 +00:00
TrueDoctor
f1b7abede7 Bundle Graphite using Tauri (#873)
* Setup tauri component for graphite editor

Integrate graphite into tauri app

Split interpreted-executor out of graph-craft

* Add gpu execution node

* General Cleanup
2022-12-11 12:46:55 -08:00
0HyperCube
cb3cb991e3 Fix inability to expose the Add node's parameter (#877)
* Fix add node

* Simplify document node input defenitions
2022-12-10 20:39:54 -08:00
TrueDoctor
6cc364b029 Implement node graph gpu execution via vulkano and rust gpu (#870)
* Add Executor abstraction

* Resolve inputs for proto nodes by adding compose nodes

* Add infrastructure for compiling gpu code

* Integrate nodegraph gpu execution into graph-crafter

* Extract graphene core path from env vars

* Make Color struct usable for gpu code
2022-12-05 12:56:36 +01:00
Keavon Chambers
951c4b665f Improve naming of nodes and 'add' menu styling 2022-12-03 23:29:55 -08:00
0HyperCube
f9d772070b Add some additional image effect nodes (#869)
* Move the Subpath type to graphene-std

* Add the transform subpath node

* Delete selected nodes

* Inserting node list on right click

* Add several bitmap manipulator nodes

* Convert add node to use f64

* Add posterize node

* Rename names randomly

* Fix naming

* Exposure node

* Fix typo

* Adjust exposure node range

* Comment out vector nodes

* Adjust exposure range again

* Posterise as ints

* Rename input

* Use >= in the to hsl function
2022-12-03 14:29:45 -08:00
0HyperCube
007afd53f6 Add support for exposing node parameter inputs (#866)
* Add exposing inputs to graph

* Use uuids and better node positioning

* Fix accidentally refering to the wrong grid spacing

* Secondary input without primary input

* Cleanup document node types

* Rename to input and addend
2022-11-22 19:57:08 +00:00
0HyperCube
47e2275e55 Add secondary inputs to nodes UI (#863)
* Add secondary inputs to UI

* Fix add node

* Dragging nodes

* Add ParameterExposeButton component

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-22 09:36:19 -08:00
0HyperCube
6cd0dbdcd0 Node graph improvements (#855)
* Selecting multiple nodes

* Improve logs

* Log bad types in dyn any

* Add (broken) node links

* New topological sort

* Fix reorder ids function

* Input and output node

* Add nodes that operate on images

* Fixups

* Show node parameters together with layer properties

* New nodes don't crash editor

* Fix tests

* Node positions backend

* Generate node graph on value change

* Add expose input message

* Fix tests

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-17 15:36:23 -08:00
0HyperCube
d9177f5f4d Add a basic API and rudimentary frontend for node graph layers (#846)
* Node graph API stub

* Rename and fix SetInputValue

* Get list of links from network

* Test populating node graph UI

* Node properties

* Fix viewport bounds

* Slightly change promise usage

* A tiny bit of cleanup I did while reading code

* Cleanup and work towards hooking up node links in Vue template

* Add the brighten colour node

* Run cargo fmt

* Add to and from hsla

* GrayscaleImage node with small perf improvement

* Fix gutter panel resizing

* Display node links from backend

* Add support for connecting node links

* Use existing message

* Fix formatting error

* Add a (currently crashing) brighten node

* Replace brighten node with proto node implementation

* Add support for connecting node links

* Update watch dirs

* Add hue shift node

* Add create_node function to editor api

* Basic insert node UI

* Fix broken names

* Add log

* Fix positioning

* Set connector index to 0

* Add properties for Heu shift / brighten

* Allow deselecting nodes

* Redesign Properties panel collapsible sections

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2022-11-12 13:23:28 -08:00
Keavon Chambers
265f11a751 Add rotation custom cursor icon for the transform cage 2022-11-05 23:02:21 -07:00
0HyperCube
9cdebfb1f0 Integrate the node graph as a Node Graph Frame layer type (#812)
* Add node graph frame tool

* Add a brighten

* Use the node graph

* Fix topological_sort

* Update UI

* Add icons for the tool and layer type

* Avoid serde & use bitmaps to improve performance

* Allow serialising a node graph

* Fix missing ..Default::default()

* Fix incorrect comments

* Cache node graph output image

* Suppress no-cycle import warning

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-05 14:38:14 -07:00
TrueDoctor
52048cb0d2 Implement Upcasting without nightly support (#825) 2022-10-25 16:37:18 -07:00
TrueDoctor
a65ac7ddfd Node graph dynamic execution (#824)
Restructure document node implementation

* Implement topological sort

* Enforce the usage of type annotations

* Add complete test case
2022-10-25 15:45:42 -07:00
0hypercube
1a4a0db7e8 Add some raster protonodes 2022-10-26 00:37:05 +02:00
TrueDoctor
2873c8fb00 Relax borrow stack lifetimes (#823)
Relax lifetimes for borrow_stack
2022-10-25 15:35:30 -07:00
TrueDoctor
097899611f Implement node registry (#822) 2022-10-25 15:32:50 -07:00
TrueDoctor
06acd45a81 Rework DynAnyNode design to work with the borrow stack (#796) 2022-10-15 03:02:58 +02:00
0hypercube
99d92ef887 Some initial testing on dynamic nodes and composition
* Test use of borrow stack
2022-10-15 02:45:02 +02:00