mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 21:51:22 +00:00 
			
		
		
		
	Plugins can select files in FileSystem Dock
This commit is contained in:
		
							parent
							
								
									f66ef74338
								
							
						
					
					
						commit
						1408fab1b4
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		|  | @ -200,6 +200,14 @@ ScriptEditor *EditorInterface::get_script_editor() { | |||
| 	return ScriptEditor::get_singleton(); | ||||
| } | ||||
| 
 | ||||
| void EditorInterface::select_file(const String &p_file) { | ||||
| 	return EditorNode::get_singleton()->get_filesystem_dock()->select_file(p_file); | ||||
| } | ||||
| 
 | ||||
| String EditorInterface::get_selected_path() const { | ||||
| 	return EditorNode::get_singleton()->get_filesystem_dock()->get_selected_path(); | ||||
| } | ||||
| 
 | ||||
| void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property) { | ||||
| 
 | ||||
| 	EditorNode::get_singleton()->push_item(p_obj, p_for_property); | ||||
|  | @ -259,6 +267,8 @@ void EditorInterface::_bind_methods() { | |||
| 	ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorInterface::get_resource_file_system); | ||||
| 	ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorInterface::get_editor_viewport); | ||||
| 	ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews); | ||||
| 	ClassDB::bind_method(D_METHOD("select_file", "p_file"), &EditorInterface::select_file); | ||||
| 	ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path); | ||||
| 
 | ||||
| 	ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene); | ||||
| 	ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true)); | ||||
|  |  | |||
|  | @ -76,6 +76,9 @@ public: | |||
| 	Array get_open_scenes() const; | ||||
| 	ScriptEditor *get_script_editor(); | ||||
| 
 | ||||
| 	void select_file(const String &p_file); | ||||
| 	String get_selected_path() const; | ||||
| 
 | ||||
| 	void inspect_object(Object *p_obj, const String &p_for_property = String()); | ||||
| 
 | ||||
| 	EditorSelection *get_selection(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Will Nations
						Will Nations