mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	[3.x] Allow reading shaders from .gdshader files
This commit is contained in:
		
							parent
							
								
									a5c62edc14
								
							
						
					
					
						commit
						7dc2edc430
					
				
					 6 changed files with 14 additions and 3 deletions
				
			
		|  | @ -2975,7 +2975,7 @@ void ScriptEditor::_on_find_in_files_result_selected(String fpath, int line_numb | |||
| 	if (ResourceLoader::exists(fpath)) { | ||||
| 		RES res = ResourceLoader::load(fpath); | ||||
| 
 | ||||
| 		if (fpath.get_extension() == "shader") { | ||||
| 		if (fpath.get_extension() == "gdshader" || fpath.get_extension() == "shader") { | ||||
| 			ShaderEditorPlugin *shader_editor = Object::cast_to<ShaderEditorPlugin>(EditorNode::get_singleton()->get_editor_data().get_editor("Shader")); | ||||
| 			shader_editor->edit(res.ptr()); | ||||
| 			shader_editor->make_visible(true); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aaron Franke
						Aaron Franke