Skip to content

Commit 051b690

Browse files
committed
removed dead code
1 parent 9db03a5 commit 051b690

File tree

4 files changed

+11
-36
lines changed

4 files changed

+11
-36
lines changed

editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,6 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
12071207
},
12081208
persistent_node_metadata: DocumentNodePersistentMetadata {
12091209
input_metadata: vec![("Image", "TODO").into()],
1210-
output_names: vec!["Red".to_string(), "Green".to_string(), "Blue".to_string(), "Alpha".to_string()],
12111210
network_metadata: None,
12121211
..Default::default()
12131212
},
@@ -1219,15 +1218,14 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
12191218
identifier: "Split Vec2",
12201219
category: "Math: Vector",
12211220
node_template: NodeTemplate {
1222-
document_node: DocumentNode {
1221+
document_node: DocumentNode {
12231222
implementation: DocumentNodeImplementation::ProtoNode(extract_xy::split_vec_2::IDENTIFIER),
12241223
inputs: vec![NodeInput::value(TaggedValue::DVec2(DVec2::ZERO), true)],
12251224
call_argument: generic!(T),
12261225
..Default::default()
12271226
},
12281227
persistent_node_metadata: DocumentNodePersistentMetadata {
12291228
input_metadata: vec![("Vec2", "TODO").into()],
1230-
output_names: vec!["X".to_string(), "Y".to_string()],
12311229
network_metadata: None,
12321230
..Default::default()
12331231
},
@@ -1239,29 +1237,13 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
12391237
),
12401238
properties: None,
12411239
},
1242-
// TODO: Remove this and just use the proto node definition directly
1240+
//TODO: Remove this and just use the proto node definition directly
12431241
DocumentNodeDefinition {
12441242
identifier: "Brush",
12451243
category: "Raster",
12461244
node_template: NodeTemplate {
12471245
document_node: DocumentNode {
1248-
implementation: DocumentNodeImplementation::Network(NodeNetwork {
1249-
exports: vec![NodeInput::node(NodeId(0), 0)],
1250-
nodes: vec![DocumentNode {
1251-
inputs: vec![
1252-
NodeInput::import(concrete!(Table<Raster<CPU>>), 0),
1253-
NodeInput::import(concrete!(Vec<brush::brush_stroke::BrushStroke>), 1),
1254-
NodeInput::import(concrete!(BrushCache), 2),
1255-
],
1256-
implementation: DocumentNodeImplementation::ProtoNode(brush::brush::brush::IDENTIFIER),
1257-
..Default::default()
1258-
}]
1259-
.into_iter()
1260-
.enumerate()
1261-
.map(|(id, node)| (NodeId(id as u64), node))
1262-
.collect(),
1263-
..Default::default()
1264-
}),
1246+
implementation: DocumentNodeImplementation::ProtoNode(brush::brush::brush::IDENTIFIER),
12651247
inputs: vec![
12661248
NodeInput::value(TaggedValue::Raster(Default::default()), true),
12671249
NodeInput::value(TaggedValue::BrushStrokes(Vec::new()), false),

node-graph/node-macro/src/destruct.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ pub fn derive(input: DeriveInput) -> syn::Result<TokenStream2> {
1313
return Err(Error::new(Span::call_site(), "Deriving `Destruct` is currently only supported for structs"));
1414
};
1515

16-
let core_types = match proc_macro_crate::crate_name("core-types")
17-
.map_err(|e| Error::new(Span::call_site(), format!("Failed to find location of core_types. Make sure it is imported as a dependency: {e}")))?
18-
{
19-
FoundCrate::Itself => quote!(crate),
20-
FoundCrate::Name(name) => {
21-
let ident = syn::Ident::new(&name, Span::call_site());
22-
quote!(#ident)
23-
}
24-
};
16+
let core_types =
17+
match proc_macro_crate::crate_name("core-types").map_err(|e| Error::new(Span::call_site(), format!("Failed to find location of core_types. Make sure it is imported as a dependency: {e}")))? {
18+
FoundCrate::Itself => quote!(crate),
19+
FoundCrate::Name(name) => {
20+
let ident = syn::Ident::new(&name, Span::call_site());
21+
quote!(#ident)
22+
}
23+
};
2524

2625
let mut node_implementations = Vec::with_capacity(data_struct.fields.len());
2726
let mut output_fields = Vec::with_capacity(data_struct.fields.len());

node-graph/nodes/gcore/src/extract_xy.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use glam::{DVec2, IVec2, UVec2};
44

55
#[derive(Debug, Clone, DynAny, node_macro::Destruct)]
66
pub struct SplitVec2Output {
7-
#[output(name = "X")]
87
pub x: f64,
9-
#[output(name = "Y")]
108
pub y: f64,
119
}
1210

node-graph/nodes/raster/src/adjustments.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@ use vector_types::GradientStops;
2121
#[cfg(feature = "std")]
2222
#[derive(Debug, Clone, dyn_any::DynAny, node_macro::Destruct)]
2323
pub struct SplitChannelsOutput {
24-
#[output(name = "Red")]
2524
pub red: Table<Raster<CPU>>,
26-
#[output(name = "Green")]
2725
pub green: Table<Raster<CPU>>,
28-
#[output(name = "Blue")]
2926
pub blue: Table<Raster<CPU>>,
30-
#[output(name = "Alpha")]
3127
pub alpha: Table<Raster<CPU>>,
3228
}
3329

0 commit comments

Comments
 (0)