You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +00:00
Allow to create scene from FileSystem dock
This commit is contained in:
@@ -1926,10 +1926,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
||||
switch (p_option) {
|
||||
case FILE_NEW_SCENE: {
|
||||
|
||||
int idx = editor_data.add_edited_scene(-1);
|
||||
_scene_tab_changed(idx);
|
||||
editor_data.clear_editor_states();
|
||||
_update_scene_tabs();
|
||||
new_scene();
|
||||
|
||||
} break;
|
||||
case FILE_NEW_INHERITED_SCENE:
|
||||
@@ -3162,6 +3159,14 @@ void EditorNode::fix_dependencies(const String &p_for_file) {
|
||||
dependency_fixer->edit(p_for_file);
|
||||
}
|
||||
|
||||
int EditorNode::new_scene() {
|
||||
int idx = editor_data.add_edited_scene(-1);
|
||||
_scene_tab_changed(idx);
|
||||
editor_data.clear_editor_states();
|
||||
_update_scene_tabs();
|
||||
return idx;
|
||||
}
|
||||
|
||||
Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, bool p_set_inherited, bool p_clear_errors, bool p_force_open_imported) {
|
||||
|
||||
if (!is_inside_tree()) {
|
||||
|
||||
Reference in New Issue
Block a user