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 "Inspect Native Shader Code" to shader inspector and shader editor #97205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tetrapod00
Copy link
Contributor

@tetrapod00 tetrapod00 commented Sep 19, 2024

Implements and closes godotengine/godot-proposals#10278.

Adds the action "Inspect Native Shader Code", currently available on the Material resource inspector (implementation), to the Shader resource inspector and to the shader editor.
LMPrAaIzQi
SC05RjXnlO

godot windows editor dev x86_64_tU88Nvc2Ah
godot windows editor dev x86_64_hcpELW4Tsh
godot windows editor dev x86_64_OBXfqaaZUL

I added the action to the shader editor under the File menu, because it's a valid action for both text and visual shaders. I can see reasons to instead do one of the following:

  • Add the action to one of the other menus, like Edit, which only appear for text shaders. This action is for advanced users, currently takes multiple seconds to open on my machine, and may be confused with the "Show Generated Shader Code" action in visual shaders. On the other hand, it is a valid action for both types of shader.
  • Not include this action in the shader editor at all. Perhaps it will cause more confusion than its worth. With this PR, you can now do File -> Open File in Inspector and then Manage object properties -> Inspect Native Shader Code.

@tetrapod00 tetrapod00 requested review from a team as code owners September 19, 2024 20:56
@tetrapod00 tetrapod00 changed the title Add "Inspect Native Shader Code" to shader resource and shader editor Add "Inspect Native Shader Code" to shader inspector and shader editor Sep 19, 2024
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.

Make "inspect native shader code" available also when selecting shader resources
2 participants