summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_data.cpp4
-rw-r--r--editor/editor_export.cpp20
-rw-r--r--editor/editor_file_dialog.cpp8
-rw-r--r--editor/editor_file_system.cpp8
-rw-r--r--editor/editor_plugin.cpp40
-rw-r--r--editor/editor_plugin.h2
-rw-r--r--editor/editor_resource_preview.cpp8
-rw-r--r--editor/editor_run_script.cpp4
-rw-r--r--editor/editor_themes.cpp4
-rw-r--r--editor/icons/2x/icon_GUI_radio_checked.pngbin0 -> 946 bytes
-rw-r--r--editor/icons/2x/icon_GUI_radio_unchecked.pngbin0 -> 799 bytes
-rw-r--r--editor/icons/icon_GUI_radio_checked.pngbin0 -> 457 bytes
-rw-r--r--editor/icons/icon_GUI_radio_unchecked.pngbin0 -> 420 bytes
-rw-r--r--editor/icons/source/icon_GUI_radio_checked.svg87
-rw-r--r--editor/icons/source/icon_GUI_radio_unchecked.svg81
-rw-r--r--editor/import/resource_importer_scene.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp28
-rw-r--r--editor/plugins/script_text_editor.cpp8
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp32
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp5
-rw-r--r--editor/property_editor.cpp21
-rw-r--r--editor/property_editor.h1
-rw-r--r--editor/spatial_editor_gizmos.cpp10
23 files changed, 300 insertions, 73 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index c3c3f0d3ca..e788fe2c13 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -867,8 +867,8 @@ void EditorSelection::_bind_methods() {
ClassDB::bind_method(D_METHOD("_node_removed"), &EditorSelection::_node_removed);
ClassDB::bind_method(D_METHOD("clear"), &EditorSelection::clear);
- ClassDB::bind_method(D_METHOD("add_node", "node:Node"), &EditorSelection::add_node);
- ClassDB::bind_method(D_METHOD("remove_node", "node:Node"), &EditorSelection::remove_node);
+ ClassDB::bind_method(D_METHOD("add_node", "node"), &EditorSelection::add_node);
+ ClassDB::bind_method(D_METHOD("remove_node", "node"), &EditorSelection::remove_node);
ClassDB::bind_method(D_METHOD("get_selected_nodes"), &EditorSelection::_get_selected_nodes);
ClassDB::bind_method(D_METHOD("get_transformable_selected_nodes"), &EditorSelection::_get_transformable_selected_nodes);
ADD_SIGNAL(MethodInfo("selection_changed"));
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 6bf92ddd2d..36fd86d88f 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -3218,24 +3218,24 @@ PoolVector<String> EditorImportExport::_get_export_platforms() {
void EditorImportExport::_bind_methods() {
- ClassDB::bind_method(D_METHOD("add_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::add_import_plugin);
- ClassDB::bind_method(D_METHOD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::remove_import_plugin);
+ ClassDB::bind_method(D_METHOD("add_import_plugin","plugin"),&EditorImportExport::add_import_plugin);
+ ClassDB::bind_method(D_METHOD("remove_import_plugin","plugin"),&EditorImportExport::remove_import_plugin);
ClassDB::bind_method(D_METHOD("get_import_plugin_count"),&EditorImportExport::get_import_plugin_count);
- ClassDB::bind_method(D_METHOD("get_import_plugin:EditorImportPlugin","idx"),&EditorImportExport::get_import_plugin);
- ClassDB::bind_method(D_METHOD("get_import_plugin_by_name:EditorImportPlugin","name"),&EditorImportExport::get_import_plugin_by_name);
+ ClassDB::bind_method(D_METHOD("get_import_plugin","idx"),&EditorImportExport::get_import_plugin);
+ ClassDB::bind_method(D_METHOD("get_import_plugin_by_name","name"),&EditorImportExport::get_import_plugin_by_name);
- ClassDB::bind_method(D_METHOD("add_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::add_export_plugin);
- ClassDB::bind_method(D_METHOD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::remove_export_plugin);
+ ClassDB::bind_method(D_METHOD("add_export_plugin","plugin"),&EditorImportExport::add_export_plugin);
+ ClassDB::bind_method(D_METHOD("remove_export_plugin","plugin"),&EditorImportExport::remove_export_plugin);
ClassDB::bind_method(D_METHOD("get_export_plugin_count"),&EditorImportExport::get_export_plugin_count);
- ClassDB::bind_method(D_METHOD("get_export_plugin:EditorExportPlugin","idx"),&EditorImportExport::get_export_plugin);
+ ClassDB::bind_method(D_METHOD("get_export_plugin","idx"),&EditorImportExport::get_export_plugin);
ClassDB::bind_method(D_METHOD("set_export_file_action","file","action"),&EditorImportExport::set_export_file_action);
ClassDB::bind_method(D_METHOD("get_export_file_action","file"),&EditorImportExport::get_export_file_action);
ClassDB::bind_method(D_METHOD("get_export_file_list"),&EditorImportExport::_get_export_file_list);
- ClassDB::bind_method(D_METHOD("add_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
- //ClassDB::bind_method(D_METHOD("remove_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
- ClassDB::bind_method(D_METHOD("get_export_platform:EditorExportPlatform","name"),&EditorImportExport::get_export_platform);
+ ClassDB::bind_method(D_METHOD("add_export_platform","platform"),&EditorImportExport::add_export_platform);
+ //ClassDB::bind_method(D_METHOD("remove_export_platform","platform"),&EditorImportExport::add_export_platform);
+ ClassDB::bind_method(D_METHOD("get_export_platform","name"),&EditorImportExport::get_export_platform);
ClassDB::bind_method(D_METHOD("get_export_platforms"),&EditorImportExport::_get_export_platforms);
ClassDB::bind_method(D_METHOD("set_export_filter","filter"),&EditorImportExport::set_export_filter);
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index c2a408e8ab..d572ee8724 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1154,7 +1154,7 @@ void EditorFileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_current_path", "path"), &EditorFileDialog::set_current_path);
ClassDB::bind_method(D_METHOD("set_mode", "mode"), &EditorFileDialog::set_mode);
ClassDB::bind_method(D_METHOD("get_mode"), &EditorFileDialog::get_mode);
- ClassDB::bind_method(D_METHOD("get_vbox:VBoxContainer"), &EditorFileDialog::get_vbox);
+ ClassDB::bind_method(D_METHOD("get_vbox"), &EditorFileDialog::get_vbox);
ClassDB::bind_method(D_METHOD("set_access", "access"), &EditorFileDialog::set_access);
ClassDB::bind_method(D_METHOD("get_access"), &EditorFileDialog::get_access);
ClassDB::bind_method(D_METHOD("set_show_hidden_files", "show"), &EditorFileDialog::set_show_hidden_files);
@@ -1454,9 +1454,9 @@ void EditorLineEditFileChooser::_bind_methods() {
ClassDB::bind_method(D_METHOD("_browse"), &EditorLineEditFileChooser::_browse);
ClassDB::bind_method(D_METHOD("_chosen"), &EditorLineEditFileChooser::_chosen);
- ClassDB::bind_method(D_METHOD("get_button:Button"), &EditorLineEditFileChooser::get_button);
- ClassDB::bind_method(D_METHOD("get_line_edit:LineEdit"), &EditorLineEditFileChooser::get_line_edit);
- ClassDB::bind_method(D_METHOD("get_file_dialog:EditorFileDialog"), &EditorLineEditFileChooser::get_file_dialog);
+ ClassDB::bind_method(D_METHOD("get_button"), &EditorLineEditFileChooser::get_button);
+ ClassDB::bind_method(D_METHOD("get_line_edit"), &EditorLineEditFileChooser::get_line_edit);
+ ClassDB::bind_method(D_METHOD("get_file_dialog"), &EditorLineEditFileChooser::get_file_dialog);
}
void EditorLineEditFileChooser::_chosen(const String &p_text) {
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 0fd643d031..eeb2f5ae8a 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -137,14 +137,14 @@ EditorFileSystemDirectory *EditorFileSystemDirectory::get_parent() {
void EditorFileSystemDirectory::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_subdir_count"), &EditorFileSystemDirectory::get_subdir_count);
- ClassDB::bind_method(D_METHOD("get_subdir:EditorFileSystemDirectory", "idx"), &EditorFileSystemDirectory::get_subdir);
+ ClassDB::bind_method(D_METHOD("get_subdir", "idx"), &EditorFileSystemDirectory::get_subdir);
ClassDB::bind_method(D_METHOD("get_file_count"), &EditorFileSystemDirectory::get_file_count);
ClassDB::bind_method(D_METHOD("get_file", "idx"), &EditorFileSystemDirectory::get_file);
ClassDB::bind_method(D_METHOD("get_file_path", "idx"), &EditorFileSystemDirectory::get_file_path);
ClassDB::bind_method(D_METHOD("get_file_type", "idx"), &EditorFileSystemDirectory::get_file_type);
ClassDB::bind_method(D_METHOD("get_name"), &EditorFileSystemDirectory::get_name);
ClassDB::bind_method(D_METHOD("get_path"), &EditorFileSystemDirectory::get_path);
- ClassDB::bind_method(D_METHOD("get_parent:EditorFileSystemDirectory"), &EditorFileSystemDirectory::get_parent);
+ ClassDB::bind_method(D_METHOD("get_parent"), &EditorFileSystemDirectory::get_parent);
ClassDB::bind_method(D_METHOD("find_file_index", "name"), &EditorFileSystemDirectory::find_file_index);
ClassDB::bind_method(D_METHOD("find_dir_index", "name"), &EditorFileSystemDirectory::find_dir_index);
}
@@ -1403,13 +1403,13 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
void EditorFileSystem::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_filesystem:EditorFileSystemDirectory"), &EditorFileSystem::get_filesystem);
+ ClassDB::bind_method(D_METHOD("get_filesystem"), &EditorFileSystem::get_filesystem);
ClassDB::bind_method(D_METHOD("is_scanning"), &EditorFileSystem::is_scanning);
ClassDB::bind_method(D_METHOD("get_scanning_progress"), &EditorFileSystem::get_scanning_progress);
ClassDB::bind_method(D_METHOD("scan"), &EditorFileSystem::scan);
ClassDB::bind_method(D_METHOD("scan_sources"), &EditorFileSystem::scan_changes);
ClassDB::bind_method(D_METHOD("update_file", "path"), &EditorFileSystem::update_file);
- ClassDB::bind_method(D_METHOD("get_filesystem_path:EditorFileSystemDirectory", "path"), &EditorFileSystem::get_filesystem_path);
+ ClassDB::bind_method(D_METHOD("get_filesystem_path", "path"), &EditorFileSystem::get_filesystem_path);
ClassDB::bind_method(D_METHOD("get_file_type", "path"), &EditorFileSystem::get_file_type);
ADD_SIGNAL(MethodInfo("filesystem_changed"));
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index c65065db43..19c77ef737 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -407,41 +407,41 @@ EditorFileSystem *EditorPlugin::get_resource_file_system() {
void EditorPlugin::_bind_methods() {
- ClassDB::bind_method(D_METHOD("add_control_to_container", "container", "control:Control"), &EditorPlugin::add_control_to_container);
- ClassDB::bind_method(D_METHOD("add_control_to_bottom_panel:ToolButton", "control:Control", "title"), &EditorPlugin::add_control_to_bottom_panel);
- ClassDB::bind_method(D_METHOD("add_control_to_dock", "slot", "control:Control"), &EditorPlugin::add_control_to_dock);
- ClassDB::bind_method(D_METHOD("remove_control_from_docks", "control:Control"), &EditorPlugin::remove_control_from_docks);
- ClassDB::bind_method(D_METHOD("remove_control_from_bottom_panel", "control:Control"), &EditorPlugin::remove_control_from_bottom_panel);
+ ClassDB::bind_method(D_METHOD("add_control_to_container", "container", "control"), &EditorPlugin::add_control_to_container);
+ ClassDB::bind_method(D_METHOD("add_control_to_bottom_panel", "control", "title"), &EditorPlugin::add_control_to_bottom_panel);
+ ClassDB::bind_method(D_METHOD("add_control_to_dock", "slot", "control"), &EditorPlugin::add_control_to_dock);
+ ClassDB::bind_method(D_METHOD("remove_control_from_docks", "control"), &EditorPlugin::remove_control_from_docks);
+ ClassDB::bind_method(D_METHOD("remove_control_from_bottom_panel", "control"), &EditorPlugin::remove_control_from_bottom_panel);
//ClassDB::bind_method(D_METHOD("add_tool_menu_item", "name", "handler", "callback", "ud"),&EditorPlugin::add_tool_menu_item,DEFVAL(Variant()));
- ClassDB::bind_method(D_METHOD("add_tool_submenu_item", "name", "submenu:PopupMenu"), &EditorPlugin::add_tool_submenu_item);
+ ClassDB::bind_method(D_METHOD("add_tool_submenu_item", "name", "submenu"), &EditorPlugin::add_tool_submenu_item);
//ClassDB::bind_method(D_METHOD("remove_tool_menu_item", "name"),&EditorPlugin::remove_tool_menu_item);
- ClassDB::bind_method(D_METHOD("add_custom_type", "type", "base", "script:Script", "icon:Texture"), &EditorPlugin::add_custom_type);
+ ClassDB::bind_method(D_METHOD("add_custom_type", "type", "base", "script", "icon"), &EditorPlugin::add_custom_type);
ClassDB::bind_method(D_METHOD("remove_custom_type", "type"), &EditorPlugin::remove_custom_type);
- ClassDB::bind_method(D_METHOD("get_editor_viewport:Control"), &EditorPlugin::get_editor_viewport);
+ ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorPlugin::get_editor_viewport);
- ClassDB::bind_method(D_METHOD("get_resource_previewer:EditorResourcePreview"), &EditorPlugin::get_resource_previewer);
- ClassDB::bind_method(D_METHOD("get_resource_filesystem:EditorFileSystem"), &EditorPlugin::get_resource_file_system);
+ ClassDB::bind_method(D_METHOD("get_resource_previewer"), &EditorPlugin::get_resource_previewer);
+ ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorPlugin::get_resource_file_system);
ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property"), &EditorPlugin::inspect_object, DEFVAL(String()));
ClassDB::bind_method(D_METHOD("update_canvas"), &EditorPlugin::update_canvas);
- ClassDB::bind_method(D_METHOD("make_bottom_panel_item_visible", "item:Control"), &EditorPlugin::make_bottom_panel_item_visible);
+ ClassDB::bind_method(D_METHOD("make_bottom_panel_item_visible", "item"), &EditorPlugin::make_bottom_panel_item_visible);
ClassDB::bind_method(D_METHOD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
- ClassDB::bind_method(D_METHOD("get_base_control:Control"), &EditorPlugin::get_base_control);
- ClassDB::bind_method(D_METHOD("get_undo_redo:UndoRedo"), &EditorPlugin::_get_undo_redo);
- ClassDB::bind_method(D_METHOD("get_selection:EditorSelection"), &EditorPlugin::get_selection);
- ClassDB::bind_method(D_METHOD("get_editor_settings:EditorSettings"), &EditorPlugin::get_editor_settings);
- ClassDB::bind_method(D_METHOD("get_script_editor:ScriptEditor"), &EditorPlugin::get_script_editor);
+ ClassDB::bind_method(D_METHOD("get_base_control"), &EditorPlugin::get_base_control);
+ ClassDB::bind_method(D_METHOD("get_undo_redo"), &EditorPlugin::_get_undo_redo);
+ ClassDB::bind_method(D_METHOD("get_selection"), &EditorPlugin::get_selection);
+ ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorPlugin::get_editor_settings);
+ ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorPlugin::get_script_editor);
ClassDB::bind_method(D_METHOD("queue_save_layout"), &EditorPlugin::queue_save_layout);
- ClassDB::bind_method(D_METHOD("edit_resource", "resource:Resource"), &EditorPlugin::edit_resource);
+ ClassDB::bind_method(D_METHOD("edit_resource", "resource"), &EditorPlugin::edit_resource);
ClassDB::bind_method(D_METHOD("open_scene_from_path", "scene_filepath"), &EditorPlugin::open_scene_from_path);
ClassDB::bind_method(D_METHOD("reload_scene_from_path", "scene_filepath"), &EditorPlugin::reload_scene_from_path);
- ClassDB::bind_method(D_METHOD("add_import_plugin", "importer:EditorImportPlugin"), &EditorPlugin::add_import_plugin);
- ClassDB::bind_method(D_METHOD("remove_import_plugin", "importer:EditorImportPlugin"), &EditorPlugin::remove_import_plugin);
+ ClassDB::bind_method(D_METHOD("add_import_plugin", "importer"), &EditorPlugin::add_import_plugin);
+ ClassDB::bind_method(D_METHOD("remove_import_plugin", "importer"), &EditorPlugin::remove_import_plugin);
ClassDB::bind_method(D_METHOD("set_input_event_forwarding_always_enabled"), &EditorPlugin::set_input_event_forwarding_always_enabled);
ClassDB::bind_method(D_METHOD("get_open_scenes"), &EditorPlugin::get_open_scenes);
- ClassDB::bind_method(D_METHOD("get_edited_scene_root:Node"), &EditorPlugin::get_edited_scene_root);
+ ClassDB::bind_method(D_METHOD("get_edited_scene_root"), &EditorPlugin::get_edited_scene_root);
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_canvas", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "canvas:Control")));
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index a0f64fb1ea..0baa373b42 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -98,7 +98,7 @@ public:
DOCK_SLOT_MAX
};
- //TODO: send a resoucre for editing to the editor node?
+ //TODO: send a resource for editing to the editor node?
void add_control_to_container(CustomControlContainer p_location, Control *p_control);
ToolButton *add_control_to_bottom_panel(Control *p_control, const String &p_title);
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 3d761d7289..dcfe68b286 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -362,10 +362,10 @@ void EditorResourcePreview::_bind_methods() {
ClassDB::bind_method("_preview_ready", &EditorResourcePreview::_preview_ready);
- ClassDB::bind_method(D_METHOD("queue_resource_preview", "path", "receiver", "receiver_func", "userdata:Variant"), &EditorResourcePreview::queue_resource_preview);
- ClassDB::bind_method(D_METHOD("queue_edited_resource_preview", "resource:Resource", "receiver", "receiver_func", "userdata:Variant"), &EditorResourcePreview::queue_edited_resource_preview);
- ClassDB::bind_method(D_METHOD("add_preview_generator", "generator:EditorResourcePreviewGenerator"), &EditorResourcePreview::add_preview_generator);
- ClassDB::bind_method(D_METHOD("remove_preview_generator", "generator:EditorResourcePreviewGenerator"), &EditorResourcePreview::remove_preview_generator);
+ ClassDB::bind_method(D_METHOD("queue_resource_preview", "path", "receiver", "receiver_func", "userdata"), &EditorResourcePreview::queue_resource_preview);
+ ClassDB::bind_method(D_METHOD("queue_edited_resource_preview", "resource", "receiver", "receiver_func", "userdata"), &EditorResourcePreview::queue_edited_resource_preview);
+ ClassDB::bind_method(D_METHOD("add_preview_generator", "generator"), &EditorResourcePreview::add_preview_generator);
+ ClassDB::bind_method(D_METHOD("remove_preview_generator", "generator"), &EditorResourcePreview::remove_preview_generator);
ClassDB::bind_method(D_METHOD("check_for_invalidation", "path"), &EditorResourcePreview::check_for_invalidation);
ADD_SIGNAL(MethodInfo("preview_invalidated", PropertyInfo(Variant::STRING, "path")));
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 0e980b040e..8bd1b8f4fd 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -81,8 +81,8 @@ void EditorScript::set_editor(EditorNode *p_editor) {
void EditorScript::_bind_methods() {
- ClassDB::bind_method(D_METHOD("add_root_node", "node:Node"), &EditorScript::add_root_node);
- ClassDB::bind_method(D_METHOD("get_scene:Node"), &EditorScript::get_scene);
+ ClassDB::bind_method(D_METHOD("add_root_node", "node"), &EditorScript::add_root_node);
+ ClassDB::bind_method(D_METHOD("get_scene"), &EditorScript::get_scene);
BIND_VMETHOD(MethodInfo("_run"));
}
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 156f00f6a3..7b1a6a8e27 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -175,6 +175,10 @@ Ref<Theme> create_editor_theme() {
theme->set_icon("unchecked", "CheckBox", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
+ theme->set_icon("radio_checked", "CheckBox", theme->get_icon("GuiRadioChecked", "EditorIcons"));
+ theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
+ theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
+ theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
// Editor background
Ref<StyleBoxFlat> style_panel = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
diff --git a/editor/icons/2x/icon_GUI_radio_checked.png b/editor/icons/2x/icon_GUI_radio_checked.png
new file mode 100644
index 0000000000..1b38071c00
--- /dev/null
+++ b/editor/icons/2x/icon_GUI_radio_checked.png
Binary files differ
diff --git a/editor/icons/2x/icon_GUI_radio_unchecked.png b/editor/icons/2x/icon_GUI_radio_unchecked.png
new file mode 100644
index 0000000000..b76bf63f2d
--- /dev/null
+++ b/editor/icons/2x/icon_GUI_radio_unchecked.png
Binary files differ
diff --git a/editor/icons/icon_GUI_radio_checked.png b/editor/icons/icon_GUI_radio_checked.png
new file mode 100644
index 0000000000..699d0966a9
--- /dev/null
+++ b/editor/icons/icon_GUI_radio_checked.png
Binary files differ
diff --git a/editor/icons/icon_GUI_radio_unchecked.png b/editor/icons/icon_GUI_radio_unchecked.png
new file mode 100644
index 0000000000..e8ce1f8e6d
--- /dev/null
+++ b/editor/icons/icon_GUI_radio_unchecked.png
Binary files differ
diff --git a/editor/icons/source/icon_GUI_radio_checked.svg b/editor/icons/source/icon_GUI_radio_checked.svg
new file mode 100644
index 0000000000..c0dc46448b
--- /dev/null
+++ b/editor/icons/source/icon_GUI_radio_checked.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 15.999999"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92+devel unknown"
+ sodipodi:docname="icon_GUI_radio_checked.svg"
+ inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="10.337496"
+ inkscape:cy="8.5995258"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:document-rotation="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4136"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3623)">
+ <circle
+ style="opacity:1;fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431374"
+ id="path4285"
+ cx="8"
+ cy="1044.3623"
+ r="5" />
+ <circle
+ style="opacity:1;fill:#e0e0e0;fill-opacity:0.78431373;stroke:none;stroke-width:2.99999523;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431373"
+ id="path4287"
+ cx="8"
+ cy="1044.3623"
+ r="2.9999952" />
+ </g>
+</svg>
diff --git a/editor/icons/source/icon_GUI_radio_unchecked.svg b/editor/icons/source/icon_GUI_radio_unchecked.svg
new file mode 100644
index 0000000000..d21ba299b6
--- /dev/null
+++ b/editor/icons/source/icon_GUI_radio_unchecked.svg
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 15.999999"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92+devel unknown"
+ sodipodi:docname="icon_GUI_radio_unchecked.svg"
+ inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="10.337496"
+ inkscape:cy="8.5995258"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:document-rotation="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4136"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3623)">
+ <circle
+ style="opacity:1;fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431374"
+ id="path4285"
+ cx="8"
+ cy="1044.3623"
+ r="5" />
+ </g>
+</svg>
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 8f7ca7611a..ae89dfd77f 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -1102,7 +1102,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), meshes_out ? 1 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/storage", PROPERTY_HINT_ENUM, "Bult-In,Files", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), materials_out ? 1 : 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/storage", PROPERTY_HINT_ENUM, "Built-In,Files", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), materials_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "materials/keep_files"), materials_out ? true : false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "geometry/compress"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "geometry/ensure_tangents"), true));
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index ac6d78adc2..a35d7a9a50 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3485,7 +3485,7 @@ void CanvasItemEditorViewport::_on_change_type() {
}
void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) const {
- label->set_position(get_global_position() + Point2(14, 14));
+ label->set_position(get_global_position() + Point2(14, 14) * EDSCALE);
label_desc->set_position(label->get_position() + Point2(0, label->get_size().height));
for (int i = 0; i < files.size(); i++) {
String path = files[i];
@@ -3791,10 +3791,16 @@ void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p
}
void CanvasItemEditorViewport::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
- connect("mouse_exited", this, "_on_mouse_exit");
- } else if (p_what == NOTIFICATION_EXIT_TREE) {
- disconnect("mouse_exited", this, "_on_mouse_exit");
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ connect("mouse_exited", this, "_on_mouse_exit");
+ label->add_color_override("font_color", get_color("warning_color", "Editor"));
+ } break;
+ case NOTIFICATION_EXIT_TREE: {
+ disconnect("mouse_exited", this, "_on_mouse_exit");
+ } break;
+
+ default: break;
}
}
@@ -3824,11 +3830,12 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
accept = memnew(AcceptDialog);
editor->get_gui_base()->add_child(accept);
- selector = memnew(WindowDialog);
+ selector = memnew(AcceptDialog);
selector->set_title(TTR("Change default type"));
VBoxContainer *vbc = memnew(VBoxContainer);
- vbc->add_constant_override("separation", 10 * EDSCALE);
+ vbc->set_h_size_flags(SIZE_EXPAND_FILL);
+ vbc->set_v_size_flags(SIZE_EXPAND_FILL);
vbc->set_custom_minimum_size(Size2(200, 260) * EDSCALE);
selector_label = memnew(Label);
@@ -3851,17 +3858,12 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
}
vbc->add_child(btn_group);
- Button *ok = memnew(Button);
- ok->set_text(TTR("OK"));
- ok->set_h_size_flags(0);
- vbc->add_child(ok);
- ok->connect("pressed", this, "_on_change_type");
+ selector->connect("confirmed", this, "_on_change_type");
selector->add_child(vbc);
editor->get_gui_base()->add_child(selector);
label = memnew(Label);
- label->add_color_override("font_color", Color(1, 1, 0, 1));
label->add_color_override("font_color_shadow", Color(0, 0, 0, 1));
label->add_constant_override("shadow_as_outline", 1 * EDSCALE);
label->hide();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 62fcc4b489..422c656351 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -355,7 +355,9 @@ void ScriptTextEditor::convert_indent_to_spaces() {
}
j++;
}
- tx->set_line(i, line);
+ if (changed_indentation) {
+ tx->set_line(i, line);
+ }
}
if (changed_indentation) {
tx->cursor_set_column(cursor_column);
@@ -409,7 +411,9 @@ void ScriptTextEditor::convert_indent_to_tabs() {
}
j++;
}
- tx->set_line(i, line);
+ if (changed_indentation) {
+ tx->set_line(i, line);
+ }
}
if (changed_indentation) {
tx->cursor_set_column(cursor_column);
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 0dba1f12a2..a549f09cb1 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -266,6 +266,8 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
float closest_dist = 1e20;
int selected_handle = -1;
+ Vector<Spatial *> subscenes = Vector<Spatial *>();
+
for (int i = 0; i < instances.size(); i++) {
Object *obj = ObjectDB::get_instance(instances[i]);
@@ -279,11 +281,19 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
Ref<SpatialEditorGizmo> seg = spat->get_gizmo();
- if (!seg.is_valid())
- continue;
+ if ((!seg.is_valid()) || found_gizmos.has(seg)) {
+
+ Node *subscene_candidate = spat;
+
+ while (subscene_candidate->get_owner() != editor->get_edited_scene())
+ subscene_candidate = subscene_candidate->get_owner();
+
+ spat = subscene_candidate->cast_to<Spatial>();
+ if (spat && (spat->get_filename() != ""))
+ subscenes.push_back(spat);
- if (found_gizmos.has(seg))
continue;
+ }
found_gizmos.insert(seg);
Vector3 point;
@@ -311,6 +321,22 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
// r_includes_current=true;
}
+ for (int idx_subscene = 0; idx_subscene < subscenes.size(); idx_subscene++) {
+
+ Spatial *subscene = subscenes.get(idx_subscene);
+ float dist = ray.cross(subscene->get_global_transform().origin - pos).length();
+
+ if ((dist < 0) || (dist > 1.2))
+ continue;
+
+ if (dist < closest_dist) {
+ closest = subscene->get_instance_id();
+ closest_dist = dist;
+ item = subscene;
+ selected_handle = -1;
+ }
+ }
+
if (!item)
return 0;
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index a52a875338..023424d891 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -49,6 +49,8 @@ void TileMapEditor::_notification(int p_what) {
rotate_180->set_icon(get_icon("Rotate180", "EditorIcons"));
rotate_270->set_icon(get_icon("Rotate270", "EditorIcons"));
+ search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
@@ -1487,6 +1489,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
toolbar = memnew(HBoxContainer);
toolbar->set_h_size_flags(SIZE_EXPAND_FILL);
toolbar->set_alignment(BoxContainer::ALIGN_END);
+ toolbar->hide();
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(toolbar);
// Tile position
@@ -1512,8 +1515,6 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
toolbar->add_child(options);
- toolbar->add_child(memnew(VSeparator));
-
transp = memnew(ToolButton);
transp->set_toggle_mode(true);
transp->set_tooltip(TTR("Transpose") + " (" + ED_GET_SHORTCUT("tile_map_editor/transpose")->get_as_text() + ")");
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 0777b6950e..53d94cdb18 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -862,6 +862,10 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
List<String> names;
names.push_back(TTR("Assign"));
names.push_back(TTR("Clear"));
+
+ if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && owner->cast_to<Node>()->has_node(v))
+ names.push_back(TTR("Select Node"));
+
config_action_buttons(names);
} break;
@@ -1269,7 +1273,18 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
v = NodePath();
emit_signal("variant_changed");
hide();
+ } else if (p_which == 2) {
+
+ if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && owner->cast_to<Node>()->has_node(v)) {
+
+ Node *target_node = owner->cast_to<Node>()->get_node(v);
+ EditorNode::get_singleton()->get_editor_selection()->clear();
+ EditorNode::get_singleton()->get_scene_tree_dock()->set_selected(target_node);
+ }
+
+ hide();
}
+
} break;
case Variant::OBJECT: {
@@ -3736,6 +3751,10 @@ void PropertyEditor::_item_selected() {
selected_property = item->get_metadata(1);
}
+void PropertyEditor::_item_rmb_edited() {
+ _custom_editor_request(true);
+}
+
void PropertyEditor::_edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field) {
if (autoclear) {
@@ -4232,6 +4251,7 @@ void PropertyEditor::_bind_methods() {
ClassDB::bind_method("_item_edited", &PropertyEditor::_item_edited);
ClassDB::bind_method("_item_selected", &PropertyEditor::_item_selected);
+ ClassDB::bind_method("_item_rmb_edited", &PropertyEditor::_item_rmb_edited);
ClassDB::bind_method("_item_folded", &PropertyEditor::_item_folded);
ClassDB::bind_method("_custom_editor_request", &PropertyEditor::_custom_editor_request);
ClassDB::bind_method("_custom_editor_edited", &PropertyEditor::_custom_editor_edited);
@@ -4386,6 +4406,7 @@ PropertyEditor::PropertyEditor() {
add_child(tree);
tree->connect("item_edited", this, "_item_edited", varray(), CONNECT_DEFERRED);
+ tree->connect("item_rmb_edited", this, "_item_rmb_edited");
tree->connect("cell_selected", this, "_item_selected");
tree->connect("item_collapsed", this, "_item_folded");
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 273eff371e..cc507d248f 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -209,6 +209,7 @@ class PropertyEditor : public Control {
void _custom_editor_request(bool p_arrow);
void _item_selected();
+ void _item_rmb_edited();
void _item_edited();
TreeItem *get_parent_node(String p_path, HashMap<String, TreeItem *> &item_paths, TreeItem *root, TreeItem *category);
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 659a3cf0d2..24be2095ce 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -562,13 +562,13 @@ void EditorSpatialGizmo::free() {
void EditorSpatialGizmo::_bind_methods() {
- ClassDB::bind_method(D_METHOD("add_lines", "lines", "material:Material", "billboard"), &EditorSpatialGizmo::add_lines, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("add_mesh", "mesh:Mesh", "billboard", "skeleton"), &EditorSpatialGizmo::add_mesh, DEFVAL(false), DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("add_lines", "lines", "material", "billboard"), &EditorSpatialGizmo::add_lines, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("add_mesh", "mesh", "billboard", "skeleton"), &EditorSpatialGizmo::add_mesh, DEFVAL(false), DEFVAL(RID()));
ClassDB::bind_method(D_METHOD("add_collision_segments", "segments"), &EditorSpatialGizmo::add_collision_segments);
- ClassDB::bind_method(D_METHOD("add_collision_triangles", "triangles:TriangleMesh"), &EditorSpatialGizmo::add_collision_triangles);
- ClassDB::bind_method(D_METHOD("add_unscaled_billboard", "material:Material", "default_scale"), &EditorSpatialGizmo::add_unscaled_billboard, DEFVAL(1));
+ ClassDB::bind_method(D_METHOD("add_collision_triangles", "triangles"), &EditorSpatialGizmo::add_collision_triangles);
+ ClassDB::bind_method(D_METHOD("add_unscaled_billboard", "material", "default_scale"), &EditorSpatialGizmo::add_unscaled_billboard, DEFVAL(1));
ClassDB::bind_method(D_METHOD("add_handles", "handles", "billboard", "secondary"), &EditorSpatialGizmo::add_handles, DEFVAL(false), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("set_spatial_node", "node:Spatial"), &EditorSpatialGizmo::_set_spatial_node);
+ ClassDB::bind_method(D_METHOD("set_spatial_node", "node"), &EditorSpatialGizmo::_set_spatial_node);
ClassDB::bind_method(D_METHOD("clear"), &EditorSpatialGizmo::clear);
BIND_VMETHOD(MethodInfo("redraw"));