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

Add read-only info to resource embedded in other scenes. #84048

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

SaracenOne
Copy link
Member

@SaracenOne SaracenOne commented Oct 27, 2023

Adds the missing 'read-only' info to the top of the inspector for situations where the inspector is viewing a resource which is part of another scene and therefore cannot be directly edited. This situation is usually not seen since when attempting to edit a resource which is linked to another scene (which wasn't imported), you can click 'edit' and will be taken directly to that scene and resource where you are allowed to perform your edits.

However, there are still some situations where you can be viewing a resource in another scene, such as using AnimationTreeEditor and viewing AnimationNodes from another scene. This PR provides consistent info to help the user understand why they are unable to edit a resource from the inspector in this situation rather than just showing them an unmodifiable inspector.
godot windows editor dev x86_64_ESojKW6O8i
godot windows editor dev x86_64_337Vsj2qwE

editor/editor_node.cpp Outdated Show resolved Hide resolved
@SaracenOne
Copy link
Member Author

Good call. I've updated it now, but I also removed the additional string assignment since the program flow you suggested means that it can simply fall through. I tested it in all the known situations and it seems to still behave fine as far as I can tell.

@akien-mga akien-mga merged commit ba79e53 into godotengine:master Oct 27, 2023
15 checks passed
@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.

2 participants