@@ -485,6 +485,70 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
485
485
} ] ,
486
486
..Default :: default ( )
487
487
} ,
488
+ DocumentNodeDefinition {
489
+ name: "Rasterize" ,
490
+ category: "Raster" ,
491
+ implementation: DocumentNodeImplementation :: Network ( NodeNetwork {
492
+ exports: vec![ NodeInput :: node( NodeId ( 2 ) , 0 ) ] ,
493
+ nodes: [
494
+ DocumentNode {
495
+ name: "Create Canvas" . to_string( ) ,
496
+ inputs: vec![ NodeInput :: network( concrete!( WasmEditorApi ) , 2 ) ] ,
497
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_std::wasm_application_io::CreateSurfaceNode" ) ) ,
498
+ skip_deduplication: true ,
499
+ ..Default :: default ( )
500
+ } ,
501
+ DocumentNode {
502
+ name: "Cache" . to_string( ) ,
503
+ manual_composition: Some ( concrete!( ( ) ) ) ,
504
+ inputs: vec![ NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
505
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_core::memo::MemoNode<_, _>" ) ) ,
506
+ ..Default :: default ( )
507
+ } ,
508
+ DocumentNode {
509
+ name: "Rasterize" . to_string( ) ,
510
+ inputs: vec![ NodeInput :: network( generic!( T ) , 0 ) , NodeInput :: network( concrete!( Footprint ) , 1 ) , NodeInput :: node( NodeId ( 1 ) , 0 ) ] ,
511
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_std::wasm_application_io::RasterizeNode<_, _>" ) ) ,
512
+ ..Default :: default ( )
513
+ } ,
514
+ ]
515
+ . into_iter( )
516
+ . enumerate( )
517
+ . map( |( id, node) | ( NodeId ( id as u64 ) , node) )
518
+ . collect( ) ,
519
+ ..Default :: default ( )
520
+ } ) ,
521
+ inputs: vec![
522
+ DocumentInputType {
523
+ name: "Artwork" ,
524
+ data_type: FrontendGraphDataType :: Raster ,
525
+ default : NodeInput :: value( TaggedValue :: VectorData ( VectorData :: default ( ) ) , true ) ,
526
+ } ,
527
+ DocumentInputType {
528
+ name: "Footprint" ,
529
+ data_type: FrontendGraphDataType :: General ,
530
+ default : NodeInput :: value(
531
+ TaggedValue :: Footprint ( Footprint {
532
+ transform: DAffine2 :: from_scale_angle_translation( DVec2 :: new( 100. , 100. ) , 0. , DVec2 :: new( 0. , 0. ) ) ,
533
+ resolution: UVec2 :: new( 100 , 100 ) ,
534
+ ..Default :: default ( )
535
+ } ) ,
536
+ false ,
537
+ ) ,
538
+ } ,
539
+ DocumentInputType {
540
+ name: "In" ,
541
+ data_type: FrontendGraphDataType :: General ,
542
+ default : NodeInput :: network( concrete!( WasmEditorApi ) , 0 ) ,
543
+ } ,
544
+ ] ,
545
+ properties: node_properties:: rasterize_properties,
546
+ outputs: vec![ DocumentOutputType {
547
+ name: "Canvas" ,
548
+ data_type: FrontendGraphDataType :: General ,
549
+ } ] ,
550
+ ..Default :: default ( )
551
+ } ,
488
552
DocumentNodeDefinition {
489
553
// This essentially builds the concept of a closure where we store variables (`let` bindings) so they can be accessed within this scope.
490
554
name: "Begin Scope" ,
@@ -722,7 +786,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
722
786
// TODO: This needs to work with resolution-aware (raster with footprint, post-Cull node) data.
723
787
DocumentNodeDefinition {
724
788
name: "Mask" ,
725
- category: "Image Adjustments " ,
789
+ category: "Raster " ,
726
790
implementation: DocumentNodeImplementation :: proto( "graphene_std::raster::MaskImageNode<_, _, _>" ) ,
727
791
inputs: vec![
728
792
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -735,7 +799,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
735
799
// TODO: This needs to work with resolution-aware (raster with footprint, post-Cull node) data.
736
800
DocumentNodeDefinition {
737
801
name: "Insert Channel" ,
738
- category: "Image Adjustments " ,
802
+ category: "Raster " ,
739
803
implementation: DocumentNodeImplementation :: proto( "graphene_std::raster::InsertChannelNode<_, _, _, _>" ) ,
740
804
inputs: vec![
741
805
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -749,7 +813,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
749
813
// TODO: This needs to work with resolution-aware (raster with footprint, post-Cull node) data.
750
814
DocumentNodeDefinition {
751
815
name: "Combine Channels" ,
752
- category: "Image Adjustments " ,
816
+ category: "Raster " ,
753
817
implementation: DocumentNodeImplementation :: proto( "graphene_std::raster::CombineChannelsNode" ) ,
754
818
inputs: vec![
755
819
DocumentInputType :: value( "None" , TaggedValue :: None , false ) ,
@@ -767,7 +831,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
767
831
// TODO: This needs to work with resolution-aware (raster with footprint, post-Cull node) data.
768
832
DocumentNodeDefinition {
769
833
name: "Blend" ,
770
- category: "Image Adjustments " ,
834
+ category: "Raster " ,
771
835
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::BlendNode<_, _, _, _>" ) ,
772
836
inputs: vec![
773
837
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -781,7 +845,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
781
845
} ,
782
846
DocumentNodeDefinition {
783
847
name: "Levels" ,
784
- category: "Image Adjustments " ,
848
+ category: "Raster " ,
785
849
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::LevelsNode<_, _, _, _, _>" ) ,
786
850
inputs: vec![
787
851
DocumentInputType {
@@ -821,7 +885,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
821
885
} ,
822
886
DocumentNodeDefinition {
823
887
name: "Black & White" ,
824
- category: "Image Adjustments " ,
888
+ category: "Raster " ,
825
889
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>" ) ,
826
890
inputs: vec![
827
891
DocumentInputType {
@@ -871,7 +935,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
871
935
} ,
872
936
DocumentNodeDefinition {
873
937
name: "Color Channel" ,
874
- category: "Image Adjustments " ,
938
+ category: "Raster " ,
875
939
implementation: DocumentNodeImplementation :: proto( "graphene_core::ops::IdentityNode" ) ,
876
940
inputs: vec![ DocumentInputType :: value( "Channel" , TaggedValue :: RedGreenBlue ( RedGreenBlue :: default ( ) ) , false ) ] ,
877
941
outputs: vec![ DocumentOutputType :: new( "Out" , FrontendGraphDataType :: General ) ] ,
@@ -889,7 +953,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
889
953
} ,
890
954
DocumentNodeDefinition {
891
955
name: "Luminance" ,
892
- category: "Image Adjustments " ,
956
+ category: "Raster " ,
893
957
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::LuminanceNode<_>" ) ,
894
958
inputs: vec![
895
959
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -901,7 +965,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
901
965
} ,
902
966
DocumentNodeDefinition {
903
967
name: "Extract Channel" ,
904
- category: "Image Adjustments " ,
968
+ category: "Raster " ,
905
969
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::ExtractChannelNode<_>" ) ,
906
970
inputs: vec![
907
971
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -913,15 +977,15 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
913
977
} ,
914
978
DocumentNodeDefinition {
915
979
name: "Extract Opaque" ,
916
- category: "Image Adjustments " ,
980
+ category: "Raster " ,
917
981
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::ExtractOpaqueNode<>" ) ,
918
982
inputs: vec![ DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ] ,
919
983
outputs: vec![ DocumentOutputType :: new( "Image" , FrontendGraphDataType :: Raster ) ] ,
920
984
..Default :: default ( )
921
985
} ,
922
986
DocumentNodeDefinition {
923
987
name: "Split Channels" ,
924
- category: "Image Adjustments " ,
988
+ category: "Raster " ,
925
989
implementation: DocumentNodeImplementation :: Network ( NodeNetwork {
926
990
exports: vec![
927
991
NodeInput :: node( NodeId ( 0 ) , 0 ) ,
@@ -1586,7 +1650,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1586
1650
#[ cfg( feature = "gpu" ) ]
1587
1651
DocumentNodeDefinition {
1588
1652
name: "GpuImage" ,
1589
- category: "Image Adjustments " ,
1653
+ category: "Raster " ,
1590
1654
implementation: DocumentNodeImplementation :: proto( "graphene_std::executor::MapGpuSingleImageNode<_>" ) ,
1591
1655
inputs: vec![
1592
1656
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1607,7 +1671,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1607
1671
#[ cfg( feature = "gpu" ) ]
1608
1672
DocumentNodeDefinition {
1609
1673
name: "Blend (GPU)" ,
1610
- category: "Image Adjustments " ,
1674
+ category: "Raster " ,
1611
1675
implementation: DocumentNodeImplementation :: proto( "graphene_std::executor::BlendGpuImageNode<_, _, _>" ) ,
1612
1676
inputs: vec![
1613
1677
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1701,15 +1765,15 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1701
1765
} ,
1702
1766
DocumentNodeDefinition {
1703
1767
name: "Invert RGB" ,
1704
- category: "Image Adjustments " ,
1768
+ category: "Raster " ,
1705
1769
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::InvertRGBNode" ) ,
1706
1770
inputs: vec![ DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ] ,
1707
1771
outputs: vec![ DocumentOutputType :: new( "Image" , FrontendGraphDataType :: Raster ) ] ,
1708
1772
..Default :: default ( )
1709
1773
} ,
1710
1774
DocumentNodeDefinition {
1711
1775
name: "Hue/Saturation" ,
1712
- category: "Image Adjustments " ,
1776
+ category: "Raster " ,
1713
1777
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::HueSaturationNode<_, _, _>" ) ,
1714
1778
inputs: vec![
1715
1779
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1723,7 +1787,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1723
1787
} ,
1724
1788
DocumentNodeDefinition {
1725
1789
name: "Brightness/Contrast" ,
1726
- category: "Image Adjustments " ,
1790
+ category: "Raster " ,
1727
1791
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::BrightnessContrastNode<_, _, _>" ) ,
1728
1792
inputs: vec![
1729
1793
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1737,7 +1801,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1737
1801
} ,
1738
1802
DocumentNodeDefinition {
1739
1803
name: "Curves" ,
1740
- category: "Image Adjustments " ,
1804
+ category: "Raster " ,
1741
1805
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::CurvesNode<_>" ) ,
1742
1806
inputs: vec![
1743
1807
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1749,7 +1813,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1749
1813
} ,
1750
1814
DocumentNodeDefinition {
1751
1815
name: "Threshold" ,
1752
- category: "Image Adjustments " ,
1816
+ category: "Raster " ,
1753
1817
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::ThresholdNode<_, _, _>" ) ,
1754
1818
inputs: vec![
1755
1819
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1763,7 +1827,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1763
1827
} ,
1764
1828
DocumentNodeDefinition {
1765
1829
name: "Vibrance" ,
1766
- category: "Image Adjustments " ,
1830
+ category: "Raster " ,
1767
1831
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::VibranceNode<_>" ) ,
1768
1832
inputs: vec![
1769
1833
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1775,7 +1839,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1775
1839
} ,
1776
1840
DocumentNodeDefinition {
1777
1841
name: "Channel Mixer" ,
1778
- category: "Image Adjustments " ,
1842
+ category: "Raster " ,
1779
1843
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::ChannelMixerNode<_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _>" ) ,
1780
1844
inputs: vec![
1781
1845
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1810,7 +1874,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1810
1874
} ,
1811
1875
DocumentNodeDefinition {
1812
1876
name: "Selective Color" ,
1813
- category: "Image Adjustments " ,
1877
+ category: "Raster " ,
1814
1878
implementation: DocumentNodeImplementation :: proto(
1815
1879
"graphene_core::raster::SelectiveColorNode<_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _>" ,
1816
1880
) ,
@@ -1872,7 +1936,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1872
1936
} ,
1873
1937
DocumentNodeDefinition {
1874
1938
name: "Opacity" ,
1875
- category: "Image Adjustments " ,
1939
+ category: "Raster " ,
1876
1940
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::OpacityNode<_>" ) ,
1877
1941
inputs: vec![
1878
1942
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1884,7 +1948,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1884
1948
} ,
1885
1949
DocumentNodeDefinition {
1886
1950
name: "Blend Mode" ,
1887
- category: "Image Adjustments " ,
1951
+ category: "Raster " ,
1888
1952
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::BlendModeNode<_>" ) ,
1889
1953
inputs: vec![
1890
1954
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1896,7 +1960,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1896
1960
} ,
1897
1961
DocumentNodeDefinition {
1898
1962
name: "Posterize" ,
1899
- category: "Image Adjustments " ,
1963
+ category: "Raster " ,
1900
1964
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::PosterizeNode<_>" ) ,
1901
1965
inputs: vec![
1902
1966
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -1908,7 +1972,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1908
1972
} ,
1909
1973
DocumentNodeDefinition {
1910
1974
name: "Exposure" ,
1911
- category: "Image Adjustments " ,
1975
+ category: "Raster " ,
1912
1976
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::ExposureNode<_, _, _>" ) ,
1913
1977
inputs: vec![
1914
1978
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -2677,7 +2741,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
2677
2741
// TODO: This needs to work with resolution-aware (raster with footprint, post-Cull node) data.
2678
2742
DocumentNodeDefinition {
2679
2743
name: "Image Segmentation" ,
2680
- category: "Image Adjustments " ,
2744
+ category: "Raster " ,
2681
2745
implementation: DocumentNodeImplementation :: proto( "graphene_std::image_segmentation::ImageSegmentationNode<_>" ) ,
2682
2746
inputs: vec![
2683
2747
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -2688,7 +2752,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
2688
2752
} ,
2689
2753
DocumentNodeDefinition {
2690
2754
name: "Index" ,
2691
- category: "Image Adjustments " ,
2755
+ category: "Raster " ,
2692
2756
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::IndexNode<_>" ) ,
2693
2757
inputs: vec![
2694
2758
DocumentInputType :: value( "Segmentation" , TaggedValue :: Segments ( vec![ ImageFrame :: empty( ) ] ) , true ) ,
@@ -2701,7 +2765,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
2701
2765
// Applies the given color to each pixel of an image but maintains the alpha value
2702
2766
DocumentNodeDefinition {
2703
2767
name: "Color Fill" ,
2704
- category: "Image Adjustments " ,
2768
+ category: "Raster " ,
2705
2769
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::adjustments::ColorFillNode<_>" ) ,
2706
2770
inputs: vec![
2707
2771
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -2713,7 +2777,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
2713
2777
} ,
2714
2778
DocumentNodeDefinition {
2715
2779
name: "Color Overlay" ,
2716
- category: "Image Adjustments " ,
2780
+ category: "Raster " ,
2717
2781
implementation: DocumentNodeImplementation :: proto( "graphene_core::raster::adjustments::ColorOverlayNode<_, _, _>" ) ,
2718
2782
inputs: vec![
2719
2783
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
@@ -2727,7 +2791,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
2727
2791
} ,
2728
2792
DocumentNodeDefinition {
2729
2793
name: "Image Color Palette" ,
2730
- category: "Image Adjustments " ,
2794
+ category: "Raster " ,
2731
2795
implementation: DocumentNodeImplementation :: proto( "graphene_std::image_color_palette::ImageColorPaletteNode<_>" ) ,
2732
2796
inputs: vec![
2733
2797
DocumentInputType :: value( "Image" , TaggedValue :: ImageFrame ( ImageFrame :: empty( ) ) , true ) ,
0 commit comments