Skip to content

Convert node no longer supports strings #3677

@0HyperCube

Description

@0HyperCube

A regression introduced by @Keavon in #3662.

Previously you could connect a number to the text (create text with text tool, open node graph, select text node, click dot next to text input)
working number -> text

Now it doesn't work:

error
This input type is incompatible:
• Input 2:
…found:       f64 called with Context
…expected: string called with Context

The name of the String type is now for some reason changed:

if self == &concrete!(&str) || self == &concrete!(String) {
return write!(f, "string");
}

So no convert node is found to match it:

let into_node_identifier = ProtoNodeIdentifier::with_owned_string(format!("graphene_core::ops::IntoNode<{}>", input_ty.clone()));
let convert_node_identifier = ProtoNodeIdentifier::with_owned_string(format!("graphene_core::ops::ConvertNode<{}>", input_ty.clone()));
let proto_node = if into_node_registry.keys().any(|ident: &ProtoNodeIdentifier| ident.as_str() == into_node_identifier.as_str()) {
generated_nodes += 1;
into_node_identifier
} else if into_node_registry.keys().any(|ident| ident.as_str() == convert_node_identifier.as_str()) {
generated_nodes += 1;
inputs.push(NodeInput::value(TaggedValue::None, false));
convert_node_identifier
} else {
identity_node.clone()
};

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Completed This Milestone

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions