@@ -366,7 +366,7 @@ where
366
366
result_table
367
367
}
368
368
369
- #[ node_macro:: node( category( "Vector " ) , path( graphene_core:: vector) ) ]
369
+ #[ node_macro:: node( category( "Instancing " ) , path( graphene_core:: vector) ) ]
370
370
async fn mirror < I : ' n + Send + Clone > (
371
371
_: impl Ctx ,
372
372
#[ implementations( GraphicGroupTable , VectorDataTable , RasterDataTable <CPU >) ] instance : Instances < I > ,
@@ -424,7 +424,7 @@ where
424
424
result_table
425
425
}
426
426
427
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
427
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
428
428
async fn round_corners (
429
429
_: impl Ctx ,
430
430
source : VectorDataTable ,
@@ -549,7 +549,7 @@ async fn round_corners(
549
549
result_table
550
550
}
551
551
552
- #[ node_macro:: node( name( "Merge by Distance" ) , category( "Vector" ) , path( graphene_core:: vector) ) ]
552
+ #[ node_macro:: node( name( "Merge by Distance" ) , category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
553
553
pub fn merge_by_distance (
554
554
_: impl Ctx ,
555
555
vector_data : VectorDataTable ,
@@ -694,7 +694,7 @@ pub fn merge_by_distance(
694
694
result_table
695
695
}
696
696
697
- #[ node_macro:: node( category( "Debug " ) , path( graphene_core:: vector) ) ]
697
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
698
698
async fn box_warp ( _: impl Ctx , vector_data : VectorDataTable , #[ expose] rectangle : VectorDataTable ) -> VectorDataTable {
699
699
let Some ( ( target, target_transform) ) = rectangle. get ( 0 ) . map ( |rect| ( rect. instance , rect. transform ) ) else {
700
700
return vector_data;
@@ -783,7 +783,7 @@ fn bilinear_interpolate(t: DVec2, quad: &[DVec2; 4]) -> DVec2 {
783
783
}
784
784
785
785
/// Automatically constructs tangents (Bézier handles) for anchor points in a vector path.
786
- #[ node_macro:: node( category( "Vector" ) , name( "Auto-Tangents" ) , path( graphene_core:: vector) ) ]
786
+ #[ node_macro:: node( category( "Vector: Modifier " ) , name( "Auto-Tangents" ) , path( graphene_core:: vector) ) ]
787
787
async fn auto_tangents (
788
788
_: impl Ctx ,
789
789
source : VectorDataTable ,
@@ -1018,7 +1018,7 @@ async fn auto_tangents(
1018
1018
// result_table
1019
1019
// }
1020
1020
1021
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1021
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1022
1022
async fn bounding_box ( _: impl Ctx , vector_data : VectorDataTable ) -> VectorDataTable {
1023
1023
let mut result_table = VectorDataTable :: default ( ) ;
1024
1024
@@ -1045,7 +1045,7 @@ async fn bounding_box(_: impl Ctx, vector_data: VectorDataTable) -> VectorDataTa
1045
1045
result_table
1046
1046
}
1047
1047
1048
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1048
+ #[ node_macro:: node( category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1049
1049
async fn dimensions ( _: impl Ctx , vector_data : VectorDataTable ) -> DVec2 {
1050
1050
vector_data
1051
1051
. instance_ref_iter ( )
@@ -1102,7 +1102,7 @@ async fn points_to_polyline(_: impl Ctx, mut points: VectorDataTable, #[default(
1102
1102
points
1103
1103
}
1104
1104
1105
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) , properties( "offset_path_properties" ) ) ]
1105
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) , properties( "offset_path_properties" ) ) ]
1106
1106
async fn offset_path ( _: impl Ctx , vector_data : VectorDataTable , distance : f64 , join : StrokeJoin , #[ default( 4. ) ] miter_limit : f64 ) -> VectorDataTable {
1107
1107
let mut result_table = VectorDataTable :: default ( ) ;
1108
1108
@@ -1146,7 +1146,7 @@ async fn offset_path(_: impl Ctx, vector_data: VectorDataTable, distance: f64, j
1146
1146
result_table
1147
1147
}
1148
1148
1149
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1149
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1150
1150
async fn solidify_stroke ( _: impl Ctx , vector_data : VectorDataTable ) -> VectorDataTable {
1151
1151
let mut result_table = VectorDataTable :: default ( ) ;
1152
1152
@@ -1314,7 +1314,7 @@ async fn sample_points(_: impl Ctx, vector_data: VectorDataTable, spacing: f64,
1314
1314
result_table
1315
1315
}
1316
1316
1317
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1317
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1318
1318
async fn split_path ( _: impl Ctx , mut vector_data : VectorDataTable , t_value : f64 , parameterized_distance : bool , reverse : bool ) -> VectorDataTable {
1319
1319
let euclidian = !parameterized_distance;
1320
1320
@@ -1355,7 +1355,7 @@ async fn split_path(_: impl Ctx, mut vector_data: VectorDataTable, t_value: f64,
1355
1355
1356
1356
/// Determines the position of a point on the path, given by its progress from 0 to 1 along the path.
1357
1357
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
1358
- #[ node_macro:: node( name( "Position on Path" ) , category( "Vector" ) , path( graphene_core:: vector) ) ]
1358
+ #[ node_macro:: node( name( "Position on Path" ) , category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1359
1359
async fn position_on_path (
1360
1360
_: impl Ctx ,
1361
1361
/// The path to traverse.
@@ -1391,7 +1391,7 @@ async fn position_on_path(
1391
1391
1392
1392
/// Determines the angle of the tangent at a point on the path, given by its progress from 0 to 1 along the path.
1393
1393
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
1394
- #[ node_macro:: node( name( "Tangent on Path" ) , category( "Vector" ) , path( graphene_core:: vector) ) ]
1394
+ #[ node_macro:: node( name( "Tangent on Path" ) , category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1395
1395
async fn tangent_on_path (
1396
1396
_: impl Ctx ,
1397
1397
/// The path to traverse.
@@ -1509,7 +1509,7 @@ async fn subpath_segment_lengths(_: impl Ctx, vector_data: VectorDataTable) -> V
1509
1509
. collect ( )
1510
1510
}
1511
1511
1512
- #[ node_macro:: node( name( "Spline" ) , category( "Vector" ) , path( graphene_core:: vector) ) ]
1512
+ #[ node_macro:: node( name( "Spline" ) , category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1513
1513
async fn spline ( _: impl Ctx , vector_data : VectorDataTable ) -> VectorDataTable {
1514
1514
let mut result_table = VectorDataTable :: default ( ) ;
1515
1515
@@ -1555,7 +1555,7 @@ async fn spline(_: impl Ctx, vector_data: VectorDataTable) -> VectorDataTable {
1555
1555
result_table
1556
1556
}
1557
1557
1558
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1558
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1559
1559
async fn jitter_points ( _: impl Ctx , vector_data : VectorDataTable , #[ default( 5. ) ] amount : f64 , seed : SeedValue ) -> VectorDataTable {
1560
1560
let mut result_table = VectorDataTable :: default ( ) ;
1561
1561
@@ -1608,7 +1608,7 @@ async fn jitter_points(_: impl Ctx, vector_data: VectorDataTable, #[default(5.)]
1608
1608
result_table
1609
1609
}
1610
1610
1611
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1611
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1612
1612
async fn morph ( _: impl Ctx , source : VectorDataTable , #[ expose] target : VectorDataTable , #[ default( 0.5 ) ] time : Fraction ) -> VectorDataTable {
1613
1613
/// Subdivides the last segment of the bezpath to until it appends 'count' number of segments.
1614
1614
fn make_new_segments ( bezpath : & mut BezPath , count : usize ) {
@@ -1878,7 +1878,7 @@ fn bevel_algorithm(mut vector_data: VectorData, vector_data_transform: DAffine2,
1878
1878
vector_data
1879
1879
}
1880
1880
1881
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1881
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1882
1882
fn bevel ( _: impl Ctx , source : VectorDataTable , #[ default( 10. ) ] distance : Length ) -> VectorDataTable {
1883
1883
let mut result_table = VectorDataTable :: default ( ) ;
1884
1884
@@ -1892,7 +1892,7 @@ fn bevel(_: impl Ctx, source: VectorDataTable, #[default(10.)] distance: Length)
1892
1892
result_table
1893
1893
}
1894
1894
1895
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1895
+ #[ node_macro:: node( category( "Vector: Modifier " ) , path( graphene_core:: vector) ) ]
1896
1896
fn close_path ( _: impl Ctx , source : VectorDataTable ) -> VectorDataTable {
1897
1897
let mut result_table = VectorDataTable :: default ( ) ;
1898
1898
@@ -1904,17 +1904,17 @@ fn close_path(_: impl Ctx, source: VectorDataTable) -> VectorDataTable {
1904
1904
result_table
1905
1905
}
1906
1906
1907
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1907
+ #[ node_macro:: node( category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1908
1908
fn point_inside ( _: impl Ctx , source : VectorDataTable , point : DVec2 ) -> bool {
1909
1909
source. instance_iter ( ) . any ( |instance| instance. instance . check_point_inside_shape ( instance. transform , point) )
1910
1910
}
1911
1911
1912
- #[ node_macro:: node( category( "Vector " ) , path( graphene_core:: vector) ) ]
1912
+ #[ node_macro:: node( category( "General " ) , path( graphene_core:: vector) ) ]
1913
1913
async fn count_elements < I > ( _: impl Ctx , #[ implementations( GraphicGroupTable , VectorDataTable , RasterDataTable <CPU >, RasterDataTable <GPU >) ] source : Instances < I > ) -> u64 {
1914
1914
source. instance_iter ( ) . count ( ) as u64
1915
1915
}
1916
1916
1917
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1917
+ #[ node_macro:: node( category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1918
1918
async fn path_length ( _: impl Ctx , source : VectorDataTable ) -> f64 {
1919
1919
source
1920
1920
. instance_iter ( )
@@ -1932,7 +1932,7 @@ async fn path_length(_: impl Ctx, source: VectorDataTable) -> f64 {
1932
1932
. sum ( )
1933
1933
}
1934
1934
1935
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1935
+ #[ node_macro:: node( category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1936
1936
async fn area ( ctx : impl Ctx + CloneVarArgs + ExtractAll , vector_data : impl Node < Context < ' static > , Output = VectorDataTable > ) -> f64 {
1937
1937
let new_ctx = OwnedContextImpl :: from ( ctx) . with_footprint ( Footprint :: default ( ) ) . into_context ( ) ;
1938
1938
let vector_data = vector_data. eval ( new_ctx) . await ;
@@ -1946,7 +1946,7 @@ async fn area(ctx: impl Ctx + CloneVarArgs + ExtractAll, vector_data: impl Node<
1946
1946
. sum ( )
1947
1947
}
1948
1948
1949
- #[ node_macro:: node( category( "Vector" ) , path( graphene_core:: vector) ) ]
1949
+ #[ node_macro:: node( category( "Vector: Measure " ) , path( graphene_core:: vector) ) ]
1950
1950
async fn centroid ( ctx : impl Ctx + CloneVarArgs + ExtractAll , vector_data : impl Node < Context < ' static > , Output = VectorDataTable > , centroid_type : CentroidType ) -> DVec2 {
1951
1951
let new_ctx = OwnedContextImpl :: from ( ctx) . with_footprint ( Footprint :: default ( ) ) . into_context ( ) ;
1952
1952
let vector_data = vector_data. eval ( new_ctx) . await ;
0 commit comments