Skip to content

Conversation

@adamgerhant
Copy link
Collaborator

@adamgerhant adamgerhant commented Dec 6, 2025

Improves the definition reference system by referencing nodes with DefinitionIdentifier instead of strings. This means protonodes use their identifier to reference their definition, instead of an arbitrary string.

Sets the foundation for an improved migration system and linking nodes to their definition when serializing.

For example:
instead of

resolve_document_node_type("Star")

you would do

resolve_document_node_type(&DefinitionIdentifier::ProtoNode(graphene_std::vector::generator_nodes::star::IDENTIFIER))

Another example

resolve_document_node_type("Merge")

to

resolve_document_node_type(&DefinitionIdentifer::Network("Merge".to_string()))

}

// Rename the old "Splines from Points" node to "Spline" and upgrade it to the new "Spline" node
if reference == "Splines from Points" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These migrations are deleted since protonodes no longer have a string reference. The only way to check for an old node is to check for the old identifier (fully qualified path), but I'm not sure what that was.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @TrueDoctor for thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants