Add SetTransformNode (#1131)

This commit is contained in:
Dennis Kobert
2023-04-15 16:34:17 +02:00
committed by Keavon Chambers
parent 0ba0b2e309
commit e21c2fb67b
3 changed files with 29 additions and 3 deletions

View File

@@ -735,19 +735,30 @@ fn static_nodes() -> Vec<DocumentNodeType> {
},
DocumentNodeType {
name: "Transform",
category: "Vector",
category: "Transform",
identifier: NodeImplementation::proto("graphene_core::transform::TransformNode<_, _, _, _, _>"),
inputs: vec![
DocumentInputType::value("Vector Data", TaggedValue::VectorData(graphene_core::vector::VectorData::empty()), true),
DocumentInputType::value("Data", TaggedValue::VectorData(graphene_core::vector::VectorData::empty()), true),
DocumentInputType::value("Translation", TaggedValue::DVec2(DVec2::ZERO), false),
DocumentInputType::value("Rotation", TaggedValue::F64(0.), false),
DocumentInputType::value("Scale", TaggedValue::DVec2(DVec2::ONE), false),
DocumentInputType::value("Skew", TaggedValue::DVec2(DVec2::ZERO), false),
DocumentInputType::value("Pivot", TaggedValue::DVec2(DVec2::splat(0.5)), false),
],
outputs: vec![DocumentOutputType::new("Vector", FrontendGraphDataType::Subpath)],
outputs: vec![DocumentOutputType::new("Data", FrontendGraphDataType::Subpath)],
properties: node_properties::transform_properties,
},
DocumentNodeType {
name: "SetTransform",
category: "Transform",
identifier: NodeImplementation::proto("graphene_core::transform::SetTransformNode<_>"),
inputs: vec![
DocumentInputType::value("Data", TaggedValue::VectorData(graphene_core::vector::VectorData::empty()), true),
DocumentInputType::value("Transform", TaggedValue::DAffine2(DAffine2::IDENTITY), true),
],
outputs: vec![DocumentOutputType::new("Data", FrontendGraphDataType::Subpath)],
properties: node_properties::no_properties,
},
DocumentNodeType {
name: "Fill",
category: "Vector",