Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
},
// 11: Switch (closed → count, open → max(count - 1, 1) as denominator)
DocumentNode {
implementation: DocumentNodeImplementation::ProtoNode(logic::switch::IDENTIFIER),
implementation: DocumentNodeImplementation::ProtoNode(math_nodes::switch::IDENTIFIER),
inputs: vec![NodeInput::node(NodeId(10), 0), NodeInput::node(NodeId(17), 0), NodeInput::node(NodeId(18), 0)],
..Default::default()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ pub(crate) fn property_from_type(
Some("Fraction") => number_widget(default_info, number_input.mode_range().min(min(0.)).max(max(1.))).into(),
Some("Progression") => progression_widget(default_info, number_input.min(min(0.))).into(),
Some("SignedInteger") => number_widget(default_info, number_input.int()).into(),
Some("IntegerCount") => number_widget(default_info, number_input.int().min(min(1.))).into(),
Some("SeedValue") => number_widget(default_info, number_input.int().min(min(0.))).into(),
Some("PixelSize") => vec2_widget(default_info, "X", "Y", unit.unwrap_or(" px"), None, false),
Some("TextArea") => text_area_widget(default_info).into(),
Expand Down
76 changes: 40 additions & 36 deletions editor/src/messages/portfolio/document_migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
node: graphene_std::animation::real_time::IDENTIFIER,
aliases: &["graphene_core::animation::RealTimeNode"],
},
NodeReplacement {
node: graphene_std::logic::serialize::IDENTIFIER,
aliases: &["graphene_core::logic::SerializeNode"],
},
NodeReplacement {
node: graphene_std::debug::size_of::IDENTIFIER,
aliases: &["graphene_core::ops::SizeOfNode"],
Expand All @@ -120,34 +116,6 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
node: graphene_std::debug::some::IDENTIFIER,
aliases: &["graphene_core::ops::SomeNode"],
},
NodeReplacement {
node: graphene_std::logic::string_concatenate::IDENTIFIER,
aliases: &["graphene_core::logic::StringConcatenateNode"],
},
NodeReplacement {
node: graphene_std::logic::string_length::IDENTIFIER,
aliases: &["graphene_core::logic::StringLengthNode"],
},
NodeReplacement {
node: graphene_std::logic::string_replace::IDENTIFIER,
aliases: &["graphene_core::logic::StringReplaceNode"],
},
NodeReplacement {
node: graphene_std::logic::string_slice::IDENTIFIER,
aliases: &["graphene_core::logic::StringSliceNode"],
},
NodeReplacement {
node: graphene_std::logic::string_split::IDENTIFIER,
aliases: &["graphene_core::logic::StringSplitNode"],
},
NodeReplacement {
node: graphene_std::logic::switch::IDENTIFIER,
aliases: &["graphene_core::logic::SwitchNode"],
},
NodeReplacement {
node: graphene_std::logic::to_string::IDENTIFIER,
aliases: &["graphene_core::logic::ToStringNode"],
},
NodeReplacement {
node: graphene_std::debug::unwrap_option::IDENTIFIER,
aliases: &["graphene_core::ops::UnwrapNode", "graphene_core::debug::UnwrapNode"],
Expand Down Expand Up @@ -416,10 +384,6 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
node: graphene_std::math_nodes::sine_inverse::IDENTIFIER,
aliases: &["graphene_math_nodes::SineInverseNode", "graphene_core::ops::SineInverseNode"],
},
NodeReplacement {
node: graphene_std::math_nodes::string_value::IDENTIFIER,
aliases: &["graphene_math_nodes::StringValueNode", "graphene_core::ops::StringValueNode"],
},
NodeReplacement {
node: graphene_std::math_nodes::subtract::IDENTIFIER,
aliases: &["graphene_math_nodes::SubtractNode", "graphene_core::ops::SubtractNode"],
Expand Down Expand Up @@ -680,6 +644,46 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
node: graphene_std::text::text::IDENTIFIER,
aliases: &["graphene_core::text::text::TextNode", "graphene_core::text::TextGeneratorNode", "graphene_core::text::TextNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::string_value::IDENTIFIER,
aliases: &["graphene_math_nodes::StringValueNode", "graphene_core::ops::StringValueNode", "math_nodes::StringValueNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::string_concatenate::IDENTIFIER,
aliases: &["graphene_core::logic::StringConcatenateNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::string_length::IDENTIFIER,
aliases: &["graphene_core::logic::StringLengthNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::string_replace::IDENTIFIER,
aliases: &["graphene_core::logic::StringReplaceNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::string_slice::IDENTIFIER,
aliases: &["graphene_core::logic::StringSliceNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::string_split::IDENTIFIER,
aliases: &["graphene_core::logic::StringSplitNode"],
},
NodeReplacement {
node: graphene_std::math_nodes::switch::IDENTIFIER,
aliases: &["graphene_core::logic::SwitchNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::to_string::IDENTIFIER,
aliases: &["graphene_core::logic::ToStringNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::json_get::IDENTIFIER,
aliases: &["graphene_core::logic::JsonGetNode"],
},
NodeReplacement {
node: graphene_std::text_nodes::serialize::IDENTIFIER,
aliases: &["graphene_core::logic::SerializeNode"],
},
// ================================
// transform
// ================================
Expand Down
1 change: 0 additions & 1 deletion node-graph/nodes/gcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ node-macro = { workspace = true }
dyn-any = { workspace = true }
glam = { workspace = true }
log = { workspace = true }
serde_json = { workspace = true }

# Optional workspace dependencies
serde = { workspace = true, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions node-graph/nodes/gcore/src/animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn animation_time(
ctx.try_animation_time().unwrap_or_default() * rate
}

#[node_macro::node(category("Animation"))]
#[node_macro::node(category("Debug"))]
async fn quantize_real_time<T>(
ctx: impl Ctx + ExtractAll + CloneVarArgs,
#[implementations(
Expand Down Expand Up @@ -103,7 +103,7 @@ async fn quantize_real_time<T>(
value.eval(Some(new_context.into())).await
}

#[node_macro::node(category("Animation"))]
#[node_macro::node(category("Debug"))]
async fn quantize_animation_time<T>(
ctx: impl Ctx + ExtractAll + CloneVarArgs,
#[implementations(
Expand Down
2 changes: 0 additions & 2 deletions node-graph/nodes/gcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub mod context;
pub mod context_modification;
pub mod debug;
pub mod extract_xy;
pub mod logic;
pub mod memo;
pub mod ops;

Expand All @@ -13,6 +12,5 @@ pub use context::*;
pub use context_modification::*;
pub use debug::*;
pub use extract_xy::*;
pub use logic::*;
pub use memo::*;
pub use ops::*;
180 changes: 0 additions & 180 deletions node-graph/nodes/gcore/src/logic.rs

This file was deleted.

4 changes: 0 additions & 4 deletions node-graph/nodes/gstd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ pub mod math {
}
}

pub mod logic {
pub use graphene_core::logic::*;
}

pub mod context {
pub use graphene_core::context::*;
}
Expand Down
1 change: 1 addition & 0 deletions node-graph/nodes/math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
core-types = { workspace = true }
node-macro = { workspace = true }
graphic-types = { workspace = true }
vector-types = { workspace = true }

# Workspace dependencies
Expand Down
Loading
Loading