module CrShader::ShaderEditorIntegration

Overview

============================================================================= ShaderEditorIntegration - Hooks CrShader Directly into Godot's "Shader Editor"

Extended Modules

Defined in:

crshader/editor/shader_editor_integration.cr

Instance Method Summary

Instance Method Detail

def active_editors : Hash(String, CrShaderTabEditor) #

def cleanup! : Void #

def compile_all_project_crshaders!(project_root : String | Nil = nil) : Int32 #

def current_tab_is_crshader? : Bool #

Returns true if the currently selected Shader Editor tab is a .crshader resource.


def discover_project_crshaders(project_root : String | Nil = nil) : Array(String) #

Discovers all project .crshader files as res:// paths.


def ensure_toolbar_controls! : Void #

Injects the 🔮 CRShader menu and contextual Edit .crshader Source button into Godot's Shader Editor bar.


def find_companion_crshader(compiled_res_path : String) : String | Nil #

Maps any generated .gdshader / .gdshaderinc / .glsl path back to its authoring .crshader path!


def locate_godot_shader_editor! : Bool #

Locates Godot 4.8's built-in "Shader Editor" dock (EditorDock / WindowWrapper), its left-hand ItemList, top menu HBoxContainer, and right-hand TabContainer.


def open_shader(path_or_res : String | CrShader::CRShader, host_plugin : Godot::Object | Nil = nil) : CrShaderTabEditor | Nil #

Opens a .crshader file (or CRShader resource) directly inside Godot's "Shader Editor" tab and returns its mounted CrShaderTabEditor.


def reveal_shader_editor_dock!(host_plugin : Godot::Object | Nil = nil) : Void #

Raises and focuses Godot's built-in "Shader Editor" bottom dock.


def save_all_open_shaders! : Void #

def shader_dock : Godot::Control | Nil #

def sync_shader_tabs! : Void #

Inspects Godot's Shader Editor open tabs and upgrades any .crshader TextShaderEditor slot in-place with CrShaderTabEditor, plus updates the contextual Edit .crshader button!


def trigger_native_new_shader_menu! : Bool #

Triggers Godot's native File -> New Shader... (Ctrl+N) menu action in the Shader Editor.


def valid_ctrl?(ctrl : Godot::Object | Nil) : Bool #