godot/editor/scene_tree_dock.cpp

/**************************************************************************/
/*  scene_tree_dock.cpp                                                   */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "scene_tree_dock.h"

#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/resource_saver.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_feature_profile.h"
#include "editor/editor_file_system.h"
#include "editor/editor_main_screen.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/filesystem_dock.h"
#include "editor/gui/editor_file_dialog.h"
#include "editor/gui/editor_quick_open_dialog.h"
#include "editor/inspector_dock.h"
#include "editor/multi_node_edit.h"
#include "editor/node_dock.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/editor_context_menu_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/reparent_dialog.h"
#include "editor/shader_create_dialog.h"
#include "editor/themes/editor_scale.h"
#include "scene/animation/animation_tree.h"
#include "scene/audio/audio_stream_player.h"
#include "scene/gui/check_box.h"
#include "scene/property_utils.h"
#include "scene/resources/packed_scene.h"
#include "servers/display_server.h"

#include "modules/modules_enabled.gen.h" // For regex.
#ifdef MODULE_REGEX_ENABLED
#include "editor/rename_dialog.h"
#endif // MODULE_REGEX_ENABLED

void SceneTreeDock::_nodes_drag_begin() {}

void SceneTreeDock::_quick_open(const String &p_file_path) {}

void SceneTreeDock::_inspect_hovered_node() {}

void SceneTreeDock::_handle_hover_to_inspect() {}

void SceneTreeDock::_reset_hovering_timer() {}

void SceneTreeDock::input(const Ref<InputEvent> &p_event) {}

void SceneTreeDock::shortcut_input(const Ref<InputEvent> &p_event) {}

void SceneTreeDock::_scene_tree_gui_input(Ref<InputEvent> p_event) {}

void SceneTreeDock::instantiate(const String &p_file) {}

void SceneTreeDock::instantiate_scenes(const Vector<String> &p_files, Node *p_parent) {}

void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, Node *p_parent, int p_pos) {}

void SceneTreeDock::_perform_create_audio_stream_players(const Vector<String> &p_files, Node *p_parent, int p_pos) {}

void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base) {}

bool SceneTreeDock::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) {}

bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_desired_node) {}

void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {}

void SceneTreeDock::_property_selected(int p_idx) {}

void SceneTreeDock::_perform_property_drop(Node *p_node, const String &p_property, Ref<Resource> p_res) {}

void SceneTreeDock::add_root_node(Node *p_node) {}

void SceneTreeDock::_notification(int p_what) {}

void SceneTreeDock::_node_replace_owner(Node *p_base, Node *p_node, Node *p_root, ReplaceOwnerMode p_mode) {}

void SceneTreeDock::_node_strip_signal_inheritance(Node *p_node) {}

void SceneTreeDock::_load_request(const String &p_path) {}

void SceneTreeDock::_script_open_request(const Ref<Script> &p_script) {}

void SceneTreeDock::_push_item(Object *p_object) {}

void SceneTreeDock::_handle_select(Node *p_node) {}

void SceneTreeDock::_node_selected() {}

void SceneTreeDock::_node_renamed() {}

void SceneTreeDock::_set_owners(Node *p_owner, const Array &p_nodes) {}

void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, HashMap<Node *, NodePath> *p_renames) {}

bool SceneTreeDock::_has_tracks_to_delete(Node *p_node, List<Node *> &p_to_delete) const {}

void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames) {}

bool SceneTreeDock::_update_node_path(Node *p_root_node, NodePath &r_node_path, HashMap<Node *, NodePath> *p_renames) const {}

bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_variant, HashMap<Node *, NodePath> *p_renames, bool p_inside_resource) const {}

void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, HashSet<int>> *r_rem_anims) {}

void SceneTreeDock::_node_prerenamed(Node *p_node, const String &p_new_name) {}

bool SceneTreeDock::_validate_no_foreign() {}

bool SceneTreeDock::_validate_no_instance() {}

void SceneTreeDock::_node_reparent(NodePath p_path, bool p_keep_global_xform) {}

void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, Vector<Node *> p_nodes, bool p_keep_global_xform) {}

void SceneTreeDock::_script_created(Ref<Script> p_script) {}

void SceneTreeDock::_shader_created(Ref<Shader> p_shader) {}

void SceneTreeDock::_script_creation_closed() {}

void SceneTreeDock::_shader_creation_closed() {}

void SceneTreeDock::_toggle_editable_children_from_selection() {}

void SceneTreeDock::_toggle_placeholder_from_selection() {}

void SceneTreeDock::_reparent_nodes_to_root(Node *p_root, const Array &p_nodes, Node *p_owner) {}

void SceneTreeDock::_reparent_nodes_to_paths_with_transform_and_name(Node *p_root, const Array &p_nodes, const Array &p_paths, const Array &p_transforms, const Array &p_names, Node *p_owner) {}

void SceneTreeDock::_toggle_editable_children(Node *p_node) {}

void SceneTreeDock::_delete_confirm(bool p_cut) {}

void SceneTreeDock::_update_script_button() {}

void SceneTreeDock::_selection_changed() {}

Node *SceneTreeDock::_do_create(Node *p_parent) {}

void SceneTreeDock::_post_do_create(Node *p_child) {}

void SceneTreeDock::_create() {}

void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node) {}

void SceneTreeDock::_replace_node(Node *p_node, Node *p_by_node, bool p_keep_properties, bool p_remove_old) {}

void SceneTreeDock::perform_node_replace(Node *p_base, Node *p_node, Node *p_by_node) {}

bool SceneTreeDock::_check_node_recursive(Variant &r_variant, Node *p_node, Node *p_by_node, const String type_hint, String &r_warn_message) {}

void SceneTreeDock::set_edited_scene(Node *p_scene) {}

static bool _is_same_selection(const Vector<Node *> &p_first, const List<Node *> &p_second) {}

void SceneTreeDock::set_selection(const Vector<Node *> &p_nodes) {}

void SceneTreeDock::set_selected(Node *p_node, bool p_emit_selected) {}

void SceneTreeDock::_new_scene_from(const String &p_file) {}

void SceneTreeDock::_set_node_owner_recursive(Node *p_node, Node *p_owner, const HashMap<const Node *, Node *> &p_inverse_duplimap) {}

static bool _is_node_visible(Node *p_node) {}

static bool _has_visible_children(Node *p_node) {}

void SceneTreeDock::_normalize_drop(Node *&to_node, int &to_pos, int p_type) {}

Array SceneTreeDock::_get_selection_array() {}

void SceneTreeDock::_files_dropped(const Vector<String> &p_files, NodePath p_to, int p_type) {}

void SceneTreeDock::_script_dropped(const String &p_file, NodePath p_to) {}

void SceneTreeDock::_nodes_dragged(const Array &p_nodes, NodePath p_to, int p_type) {}

void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) {}

void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {}

void SceneTreeDock::_update_tree_menu() {}

void SceneTreeDock::_filter_changed(const String &p_filter) {}

void SceneTreeDock::_filter_gui_input(const Ref<InputEvent> &p_event) {}

void SceneTreeDock::_filter_option_selected(int p_option) {}

void SceneTreeDock::_append_filter_options_to(PopupMenu *p_menu, bool p_include_separator) {}

String SceneTreeDock::get_filter() {}

void SceneTreeDock::set_filter(const String &p_filter) {}

void SceneTreeDock::save_branch_to_file(const String &p_directory) {}

void SceneTreeDock::_focus_node() {}

void SceneTreeDock::attach_script_to_selected(bool p_extend) {}

void SceneTreeDock::open_script_dialog(Node *p_for_node, bool p_extend) {}

void SceneTreeDock::attach_shader_to_selected(int p_preferred_mode) {}

void SceneTreeDock::open_shader_dialog(const Ref<ShaderMaterial> &p_for_material, int p_preferred_mode) {}

void SceneTreeDock::open_add_child_dialog() {}

void SceneTreeDock::open_instance_child_dialog() {}

List<Node *> SceneTreeDock::paste_nodes(bool p_paste_as_sibling) {}

List<Node *> SceneTreeDock::get_node_clipboard() const {}

void SceneTreeDock::add_remote_tree_editor(Control *p_remote) {}

void SceneTreeDock::show_remote_tree() {}

void SceneTreeDock::hide_remote_tree() {}

void SceneTreeDock::show_tab_buttons() {}

void SceneTreeDock::hide_tab_buttons() {}

void SceneTreeDock::_remote_tree_selected() {}

void SceneTreeDock::_local_tree_selected() {}

void SceneTreeDock::_update_create_root_dialog(bool p_initializing) {}

void SceneTreeDock::_favorite_root_selected(const String &p_class) {}

void SceneTreeDock::_feature_profile_changed() {}

void SceneTreeDock::_clear_clipboard() {}

void SceneTreeDock::_create_remap_for_node(Node *p_node, HashMap<Ref<Resource>, Ref<Resource>> &r_remap) {}

void SceneTreeDock::_create_remap_for_resource(Ref<Resource> p_resource, HashMap<Ref<Resource>, Ref<Resource>> &r_remap) {}

void SceneTreeDock::_list_all_subresources(PopupMenu *p_menu) {}

void SceneTreeDock::_gather_resources(Node *p_node, List<Pair<Ref<Resource>, Node *>> &r_resources) {}

void SceneTreeDock::_edit_subresource(int p_idx, const PopupMenu *p_from_menu) {}

void SceneTreeDock::_bind_methods() {}

SceneTreeDock *SceneTreeDock::singleton =;

void SceneTreeDock::_update_configuration_warning() {}

SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data) {}

SceneTreeDock::~SceneTreeDock() {}