Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support metadata in MultiNodeEdit #71345

Merged

Conversation

reduz
Copy link
Member

@reduz reduz commented Jan 13, 2023

Small hack for metadata to work there (similar to existing script hack). Does not appear within its own category, not sure if its worth hacking it (would need to be hacked in inspector).

Fixes #59604.

image

Small hack for metadata to work there (similar to existing script hack).
Does not appear within its own category, not sure if its worth hacking it (would need to be hacked in inspector).

Fixes godotengine#59604.
if (F.name == "script") {
continue; // Added later manually, since this is intercepted before being set (check Variant Object::get()).
} else if (F.name.begins_with("metadata/")) {
F.name = F.name.replace_first("metadata/", "Metadata/"); // Trick to not get actual metadata edited from MultiNodeEdit.
Copy link
Member

Choose a reason for hiding this comment

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

If this hack is to prevent actual MultiNodeEdit metadata from being edited, can we use something more obvious such as "_metadata"? Uppercase vs lowercase may be difficult to distinguish.

Copy link
Member Author

Choose a reason for hiding this comment

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

MultiNodeEdit actual metadata is not editable, so this is not a problem

@akien-mga akien-mga merged commit adf109d into godotengine:master Jan 21, 2023
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Metadata editing does not work if multiple nodes are selected
4 participants