mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
move nodes from graphic_element itself to gelement-nodes
This commit is contained in:
@@ -242,14 +242,14 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
||||
// Secondary (left) input type coercion
|
||||
DocumentNode {
|
||||
inputs: vec![NodeInput::network(generic!(T), 1)],
|
||||
implementation: DocumentNodeImplementation::proto("graphene_core::graphic_element::ToElementNode"),
|
||||
implementation: DocumentNodeImplementation::proto("graphene_element_nodes::conversion::ToElementNode"),
|
||||
manual_composition: Some(concrete!(Context)),
|
||||
..Default::default()
|
||||
},
|
||||
// Primary (bottom) input type coercion
|
||||
DocumentNode {
|
||||
inputs: vec![NodeInput::network(generic!(T), 0)],
|
||||
implementation: DocumentNodeImplementation::proto("graphene_core::graphic_element::ToGroupNode"),
|
||||
implementation: DocumentNodeImplementation::proto("graphene_element_nodes::conversion::ToGroupNode"),
|
||||
manual_composition: Some(concrete!(Context)),
|
||||
..Default::default()
|
||||
},
|
||||
@@ -268,7 +268,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
||||
NodeInput::node(NodeId(2), 0),
|
||||
NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath),
|
||||
],
|
||||
implementation: DocumentNodeImplementation::proto("graphene_core::graphic_element::LayerNode"),
|
||||
implementation: DocumentNodeImplementation::proto("graphene_element_nodes::conversion::LayerNode"),
|
||||
..Default::default()
|
||||
},
|
||||
]
|
||||
@@ -349,7 +349,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
||||
// Ensure this ID is kept in sync with the ID in set_alias so that the name input is kept in sync with the alias
|
||||
DocumentNode {
|
||||
manual_composition: Some(generic!(T)),
|
||||
implementation: DocumentNodeImplementation::proto("graphene_core::graphic_element::ToArtboardNode"),
|
||||
implementation: DocumentNodeImplementation::proto("graphene_element_nodes::conversion::ToArtboardNode"),
|
||||
inputs: vec![
|
||||
NodeInput::network(concrete!(TaggedValue), 1),
|
||||
NodeInput::value(TaggedValue::String(String::from("Artboard")), false),
|
||||
@@ -376,7 +376,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
||||
NodeInput::node(NodeId(1), 0),
|
||||
NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath),
|
||||
],
|
||||
implementation: DocumentNodeImplementation::proto("graphene_core::graphic_element::AppendArtboardNode"),
|
||||
implementation: DocumentNodeImplementation::proto("graphene_element_nodes::conversion::AppendArtboardNode"),
|
||||
..Default::default()
|
||||
},
|
||||
]
|
||||
|
||||
@@ -131,6 +131,13 @@ const REPLACEMENTS: &[(&str, &str)] = &[
|
||||
("graphene_std::raster::MaskImageNode", "graphene_std::raster::MaskNode"),
|
||||
("graphene_core::vector::FlattenVectorElementsNode", "graphene_core::vector::FlattenPathNode"),
|
||||
("graphene_std::vector::BooleanOperationNode", "graphene_path_bool::BooleanOperationNode"),
|
||||
("graphene_core::graphic_element::LayerNode", "graphene_element_nodes::conversion::LayerNode"),
|
||||
("graphene_core::graphic_element::ToElementNode", "graphene_element_nodes::conversion::ToElementNode"),
|
||||
("graphene_core::graphic_element::ToGroupNode", "graphene_element_nodes::conversion::ToGroupNode"),
|
||||
("graphene_core::graphic_element::FlattenGroupNode", "graphene_element_nodes::conversion::FlattenGroupNode"),
|
||||
("graphene_core::graphic_element::FlattenVectorNode", "graphene_element_nodes::conversion::FlattenVectorNode"),
|
||||
("graphene_core::graphic_element::ToArtboardNode", "graphene_element_nodes::conversion::ToArtboardNode"),
|
||||
("graphene_core::graphic_element::AppendArtboardNode", "graphene_element_nodes::conversion::AppendArtboardNode"),
|
||||
];
|
||||
|
||||
pub fn document_migration_string_preprocessing(document_serialized_content: String) -> String {
|
||||
|
||||
@@ -567,7 +567,9 @@ mod test_artboard {
|
||||
Ok(instrumented) => instrumented,
|
||||
Err(e) => panic!("Failed to evaluate graph: {}", e),
|
||||
};
|
||||
instrumented.grab_all_input::<graphene_std::append_artboard::ArtboardInput>(&editor.runtime).collect()
|
||||
instrumented
|
||||
.grab_all_input::<graphene_std::element_nodes::conversion::append_artboard::ArtboardInput>(&editor.runtime)
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user