Skip to content

Refactor ShaderEditorPlugin to use ScriptEditor#115998

Open
TheDying0fLight wants to merge 1 commit intogodotengine:masterfrom
TheDying0fLight:merge-shader-and-text-editors-2
Open

Refactor ShaderEditorPlugin to use ScriptEditor#115998
TheDying0fLight wants to merge 1 commit intogodotengine:masterfrom
TheDying0fLight:merge-shader-and-text-editors-2

Conversation

@TheDying0fLight
Copy link
Contributor

@TheDying0fLight TheDying0fLight commented Feb 7, 2026

Changes

  • re-implements ShaderEditorPlugin using the ScriptEditor class used for the ScriptEditorPlugin
  • ShaderEditor classes inherit from ScriptEditorBase classes
  • indirectly adds some script editor features, for example a tab history or function folding
  • some shortcuts are changed to only work when a ScriptEditor is focused, because of ScriptEditor focus loss when using next_script / prev_script shortcuts #117209 these sometimes stop working until an editor is focused again by clicking on it

Changes that could be controversial

  • VisualShaderEditor now has a menu bar at the top reducing space. I did not find a nice way around this. If it stays this way the menu bar could be used for the toggle_files_panel_button so it is at the same location for each editor type.
  • I created a shared build function for the context and file menus as they have several options in common. This makes sure the order for the same options are the same in the two menus and therefore rearranges some of them.
  • I tried to make the Shader Editor (file and context) menus more similar to the Script Editor menus for more consistency between the editors and the Shader Editor menus have a lot more options now.

@TheDying0fLight TheDying0fLight force-pushed the merge-shader-and-text-editors-2 branch 2 times, most recently from ba7b2a8 to 492d2c1 Compare February 11, 2026 17:29
@TheDying0fLight TheDying0fLight marked this pull request as ready for review February 11, 2026 17:29
@TheDying0fLight TheDying0fLight requested review from a team as code owners February 11, 2026 17:29
@TheDying0fLight TheDying0fLight requested a review from a team as a code owner February 14, 2026 11:53
@TheDying0fLight TheDying0fLight force-pushed the merge-shader-and-text-editors-2 branch 3 times, most recently from c027af8 to 2568c5a Compare February 18, 2026 17:59
@TheDying0fLight TheDying0fLight force-pushed the merge-shader-and-text-editors-2 branch 2 times, most recently from d7ceb8c to 09df8e4 Compare March 5, 2026 11:02
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

Code looks good to me! Great work!

Haven't tested the functionality

@Repiteo Repiteo requested a review from kitbdev March 5, 2026 13:45
@TheDying0fLight TheDying0fLight force-pushed the merge-shader-and-text-editors-2 branch 2 times, most recently from 7ba9f75 to 63f7dc7 Compare March 9, 2026 08:43
@TheDying0fLight TheDying0fLight force-pushed the merge-shader-and-text-editors-2 branch from 63f7dc7 to 3ee514b Compare March 9, 2026 08:51
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.

Refactor code editors

2 participants