Additional Input and Math Nodes (#1369)

* Add Input Nodes and additional Math Nodes

* Add add node to node registry

* Update node-graph/gcore/src/ops.rs

Co-authored-by: Dennis Kobert <dennis@kobert.dev>

* Fix Color Input Node

Wrong input type

* Remove non Parameter variants

* Remove non Parameter variants

* Remove non Parameter variants

* Apply suggestions from code review

* mod to modulo

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
Ezbaze 2023-08-08 16:31:50 +01:00 committed by GitHub
parent e32d4c29c4
commit 5c08248681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 298 additions and 9 deletions

View file

@ -196,6 +196,46 @@ fn node_registry() -> HashMap<NodeIdentifier, HashMap<NodeIOTypes, NodeConstruct
register_node!(graphene_core::ops::AddParameterNode<_>, input: &f32, params: [f32]),
register_node!(graphene_core::ops::AddParameterNode<_>, input: f32, params: [&f32]),
register_node!(graphene_core::ops::AddParameterNode<_>, input: &f32, params: [&f32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: u32, params: [u32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: &u32, params: [u32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: u32, params: [&u32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: &u32, params: [&u32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: f32, params: [f32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: &f32, params: [f32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: f32, params: [&f32]),
register_node!(graphene_core::ops::SubtractParameterNode<_>, input: &f32, params: [&f32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: u32, params: [u32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: &u32, params: [u32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: u32, params: [&u32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: &u32, params: [&u32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: f32, params: [f32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: &f32, params: [f32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: f32, params: [&f32]),
register_node!(graphene_core::ops::DivideParameterNode<_>, input: &f32, params: [&f32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: u32, params: [u32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: &u32, params: [u32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: u32, params: [&u32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: &u32, params: [&u32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: f32, params: [f32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: &f32, params: [f32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: f32, params: [&f32]),
register_node!(graphene_core::ops::MultiplyParameterNode<_>, input: &f32, params: [&f32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: u32, params: [u32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: &u32, params: [u32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: u32, params: [&u32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: &u32, params: [&u32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: f32, params: [f32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: &f32, params: [f32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: f32, params: [&f32]),
register_node!(graphene_core::ops::ExponentParameterNode<_>, input: &f32, params: [&f32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: u32, params: [u32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: &u32, params: [u32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: u32, params: [&u32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: &u32, params: [&u32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: f32, params: [f32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: &f32, params: [f32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: f32, params: [&f32]),
register_node!(graphene_core::ops::ModuloParameterNode<_>, input: &f32, params: [&f32]),
register_node!(graphene_core::ops::SomeNode, input: WasmEditorApi, params: []),
async_node!(graphene_core::ops::IntoNode<_, ImageFrame<SRGBA8>>, input: ImageFrame<Color>, output: ImageFrame<SRGBA8>, params: []),
async_node!(graphene_core::ops::IntoNode<_, ImageFrame<Color>>, input: ImageFrame<SRGBA8>, output: ImageFrame<Color>, params: []),