Skip to content

Commit f71278f

Browse files
committed
Improve implementations
1 parent f299d2c commit f71278f

File tree

8 files changed

+361
-181
lines changed

8 files changed

+361
-181
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
537537
},
538538
// 11: Switch (closed → count, open → max(count - 1, 1) as denominator)
539539
DocumentNode {
540-
implementation: DocumentNodeImplementation::ProtoNode(logic::switch::IDENTIFIER),
540+
implementation: DocumentNodeImplementation::ProtoNode(math_nodes::switch::IDENTIFIER),
541541
inputs: vec![NodeInput::node(NodeId(10), 0), NodeInput::node(NodeId(17), 0), NodeInput::node(NodeId(18), 0)],
542542
..Default::default()
543543
},
@@ -1491,7 +1491,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
14911491
},
14921492
DocumentNodeDefinition {
14931493
identifier: "Regex Find",
1494-
category: "Text",
1494+
category: "Text: Regex",
14951495
node_template: NodeTemplate {
14961496
document_node: DocumentNode {
14971497
implementation: DocumentNodeImplementation::Network(NodeNetwork {
@@ -1548,7 +1548,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
15481548
("Pattern", "The regular expression pattern to search for.").into(),
15491549
(
15501550
"Match Index",
1551-
"Which occurrence of the pattern to return (0 for the first). Negative indices count from the last match.",
1551+
"Which non-overlapping occurrence of the pattern to return, starting from 0 for the first match. Negative indices count backwards from the last match.",
15521552
)
15531553
.into(),
15541554
("Case Insensitive", "Match letters regardless of case.").into(),
@@ -1567,7 +1567,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
15671567
},
15681568
DocumentNodeMetadata {
15691569
persistent_metadata: DocumentNodePersistentMetadata {
1570-
node_type_metadata: NodeTypePersistentMetadata::node(IVec2::new(8, -2)),
1570+
node_type_metadata: NodeTypePersistentMetadata::node(IVec2::new(8, 0)),
15711571
..Default::default()
15721572
},
15731573
..Default::default()
@@ -1591,7 +1591,9 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
15911591
..Default::default()
15921592
},
15931593
},
1594-
description: Cow::Borrowed("Finds a regex match in the string. The primary output is the whole match, and the secondary output is the list of capture groups."),
1594+
description: Cow::Borrowed(
1595+
r#"Finds a portion of the string matching a regular expression pattern. With "Match Index" at its default 0, it selects the first non-overlapping occurrence, but others may be selected. Capture groups, if any, are produced as a list in the "Captures" output."#,
1596+
),
15951597
properties: None,
15961598
},
15971599
// Aims for interoperable compatibility with:

editor/src/messages/portfolio/document_migration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
142142
aliases: &["graphene_core::logic::StringSplitNode"],
143143
},
144144
NodeReplacement {
145-
node: graphene_std::logic::switch::IDENTIFIER,
145+
node: graphene_std::math_nodes::switch::IDENTIFIER,
146146
aliases: &["graphene_core::logic::SwitchNode"],
147147
},
148148
NodeReplacement {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn animation_time(
6060
ctx.try_animation_time().unwrap_or_default() * rate
6161
}
6262

63-
#[node_macro::node(category("Animation"))]
63+
#[node_macro::node(category("Debug"))]
6464
async fn quantize_real_time<T>(
6565
ctx: impl Ctx + ExtractAll + CloneVarArgs,
6666
#[implementations(
@@ -103,7 +103,7 @@ async fn quantize_real_time<T>(
103103
value.eval(Some(new_context.into())).await
104104
}
105105

106-
#[node_macro::node(category("Animation"))]
106+
#[node_macro::node(category("Debug"))]
107107
async fn quantize_animation_time<T>(
108108
ctx: impl Ctx + ExtractAll + CloneVarArgs,
109109
#[implementations(

0 commit comments

Comments
 (0)