-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Add "Inspect Native Shader Code" to shader inspector and shader editor #97205
Conversation
b0663ce
to
fe70d2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally on both text and visual shaders, it works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me!
Maybe hold off on merging. I want to see if being exposed to scripting causes problems, and if there's a good way to avoid exposing at least the new implementation to scripting. Un-exposing the Material implementation probably breaks compat even if it's correct to do. |
fe70d2c
to
5073b85
Compare
Made the small style changes. I also looked into whether the method needs to be exposed to the class DB and scripting, and I believe it does. The resource inspector dock uses the class DB to add methods to the See the inspector dock implementation: godot/editor/inspector_dock.cpp Lines 566 to 583 in 842f982
|
5073b85
to
12d2c05
Compare
@tetrapod00 I'm a little lost in the last few comments. Is this PR ready for merging now? |
Yes, the PR is ready to merge. The function |
Thanks! |
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.
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: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.File -> Open File in Inspector
and thenManage object properties -> Inspect Native Shader Code
.