summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/create_dialog.cpp4
-rw-r--r--editor/editor_autoload_settings.cpp29
-rw-r--r--editor/editor_autoload_settings.h3
-rw-r--r--editor/editor_settings.cpp56
-rw-r--r--editor/editor_settings.h1
-rw-r--r--editor/filesystem_dock.cpp24
-rw-r--r--editor/filesystem_dock.h2
-rw-r--r--editor/plugins/editor_preview_plugins.cpp68
-rw-r--r--modules/visual_script/visual_script_editor.cpp44
-rw-r--r--modules/visual_script/visual_script_editor.h1
-rw-r--r--platform/windows/detect.py4
-rw-r--r--scene/resources/primitive_meshes.cpp16
12 files changed, 198 insertions, 54 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 48ceb82dc3..fdc58e6292 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -316,6 +316,10 @@ void CreateDialog::_update_search() {
}
}
+ if (search_box->get_text() == "") {
+ to_select = root;
+ }
+
if (to_select) {
to_select->select(0);
search_options->scroll_to_item(to_select);
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 393c33c1b0..d3e697ac35 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -246,7 +246,9 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
UndoRedo *undo_redo = EditorNode::get_undo_redo();
switch (p_button) {
-
+ case BUTTON_OPEN: {
+ _autoload_open(ti->get_text(1));
+ } break;
case BUTTON_MOVE_UP:
case BUTTON_MOVE_DOWN: {
@@ -305,6 +307,21 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
}
}
+void EditorAutoloadSettings::_autoload_activated() {
+ TreeItem *ti = tree->get_selected();
+ if (!ti)
+ return;
+ _autoload_open(ti->get_text(1));
+}
+
+void EditorAutoloadSettings::_autoload_open(const String &fpath) {
+ if (ResourceLoader::get_resource_type(fpath) == "PackedScene") {
+ EditorNode::get_singleton()->open_request(fpath);
+ } else {
+ EditorNode::get_singleton()->load_resource(fpath);
+ }
+ ProjectSettingsEditor::get_singleton()->hide();
+}
void EditorAutoloadSettings::_autoload_file_callback(const String &p_path) {
autoload_add_name->set_text(p_path.get_file().get_basename());
@@ -356,13 +373,13 @@ void EditorAutoloadSettings::update_autoload() {
item->set_editable(0, true);
item->set_text(1, path);
- item->set_selectable(1, false);
+ item->set_selectable(1, true);
item->set_cell_mode(2, TreeItem::CELL_MODE_CHECK);
item->set_editable(2, true);
item->set_text(2, TTR("Enable"));
item->set_checked(2, global);
-
+ item->add_button(3, get_icon("FileList", "EditorIcons"), BUTTON_OPEN);
item->add_button(3, get_icon("MoveUp", "EditorIcons"), BUTTON_MOVE_UP);
item->add_button(3, get_icon("MoveDown", "EditorIcons"), BUTTON_MOVE_DOWN);
item->add_button(3, get_icon("Remove", "EditorIcons"), BUTTON_DELETE);
@@ -529,6 +546,8 @@ void EditorAutoloadSettings::_bind_methods() {
ClassDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
ClassDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
ClassDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
+ ClassDB::bind_method("_autoload_activated", &EditorAutoloadSettings::_autoload_activated);
+ ClassDB::bind_method("_autoload_open", &EditorAutoloadSettings::_autoload_open);
ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
@@ -595,12 +614,12 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_column_min_width(2, 80);
tree->set_column_expand(3, false);
- tree->set_column_min_width(3, 80);
+ tree->set_column_min_width(3, 120);
tree->connect("cell_selected", this, "_autoload_selected");
tree->connect("item_edited", this, "_autoload_edited");
tree->connect("button_pressed", this, "_autoload_button_pressed");
-
+ tree->connect("item_activated", this, "_autoload_activated");
tree->set_v_size_flags(SIZE_EXPAND_FILL);
add_child(tree, true);
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index 39f902179c..2e34a8b17f 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -40,6 +40,7 @@ class EditorAutoloadSettings : public VBoxContainer {
GDCLASS(EditorAutoloadSettings, VBoxContainer);
enum {
+ BUTTON_OPEN,
BUTTON_MOVE_UP,
BUTTON_MOVE_DOWN,
BUTTON_DELETE
@@ -72,6 +73,8 @@ class EditorAutoloadSettings : public VBoxContainer {
void _autoload_selected();
void _autoload_edited();
void _autoload_button_pressed(Object *p_item, int p_column, int p_button);
+ void _autoload_activated();
+ void _autoload_open(const String &fpath);
void _autoload_file_callback(const String &p_path);
Variant get_drag_data_fw(const Point2 &p_point, Control *p_control);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index c6676a1f0f..29363e29c1 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -256,8 +256,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
String best;
- for (int i = 0; i < translations.size(); i++) {
- String locale = translations[i]->get_locale();
+ EditorTranslationList *etl = _editor_translations;
+
+ while (etl->data) {
+
+ const String &locale = etl->lang;
lang_hint += ",";
lang_hint += locale;
@@ -268,6 +271,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
if (best == String() && host_lang.begins_with(locale)) {
best = locale;
}
+
+ etl++;
}
if (best == String()) {
@@ -883,11 +888,29 @@ void EditorSettings::setup_language() {
if (lang == "en")
return; //none to do
- for (int i = 0; i < translations.size(); i++) {
- if (translations[i]->get_locale() == lang) {
- TranslationServer::get_singleton()->set_tool_translation(translations[i]);
- break;
+ EditorTranslationList *etl = _editor_translations;
+
+ while (etl->data) {
+
+ if (etl->lang == lang) {
+
+ Vector<uint8_t> data;
+ data.resize(etl->uncomp_size);
+ Compression::decompress(data.ptrw(), etl->uncomp_size, etl->data, etl->comp_size, Compression::MODE_DEFLATE);
+
+ FileAccessMemory *fa = memnew(FileAccessMemory);
+ fa->open_custom(data.ptr(), data.size());
+
+ Ref<Translation> tr = TranslationLoaderPO::load_translation(fa, NULL, "translation_" + String(etl->lang));
+
+ if (tr.is_valid()) {
+ tr->set_locale(etl->lang);
+ TranslationServer::get_singleton()->set_tool_translation(tr);
+ break;
+ }
}
+
+ etl++;
}
}
@@ -1457,27 +1480,6 @@ EditorSettings::EditorSettings() {
optimize_save = true;
save_changed_setting = true;
- EditorTranslationList *etl = _editor_translations;
-
- while (etl->data) {
-
- Vector<uint8_t> data;
- data.resize(etl->uncomp_size);
- Compression::decompress(data.ptrw(), etl->uncomp_size, etl->data, etl->comp_size, Compression::MODE_DEFLATE);
-
- FileAccessMemory *fa = memnew(FileAccessMemory);
- fa->open_custom(data.ptr(), data.size());
-
- Ref<Translation> tr = TranslationLoaderPO::load_translation(fa, NULL, "translation_" + String(etl->lang));
-
- if (tr.is_valid()) {
- tr->set_locale(etl->lang);
- translations.push_back(tr);
- }
-
- etl++;
- }
-
_load_defaults();
}
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 8bcb599a67..e196ca506e 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -95,7 +95,6 @@ private:
int last_order;
Ref<Resource> clipboard;
- Vector<Ref<Translation> > translations;
Map<String, Ref<ShortCut> > shortcuts;
String resource_path;
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 9804d1d9a3..e26f4ba449 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -30,6 +30,7 @@
#include "filesystem_dock.h"
+#include "core/os/keyboard.h"
#include "editor_node.h"
#include "editor_settings.h"
#include "io/resource_loader.h"
@@ -1641,6 +1642,23 @@ void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) {
call_deferred("_update_import_dock");
}
+void FileSystemDock::_files_gui_input(Ref<InputEvent> p_event) {
+
+ if (get_viewport()->get_modal_stack_top())
+ return; //ignore because of modal window
+
+ Ref<InputEventKey> key = p_event;
+ if (key.is_valid() && key->is_pressed() && !key->is_echo()) {
+ if (ED_IS_SHORTCUT("filesystem_dock/duplicate", p_event)) {
+ _file_option(FILE_DUPLICATE);
+ } else if (ED_IS_SHORTCUT("filesystem_dock/copy_path", p_event)) {
+ _file_option(FILE_COPY_PATH);
+ } else if (ED_IS_SHORTCUT("filesystem_dock/delete", p_event)) {
+ _file_option(FILE_REMOVE);
+ }
+ }
+}
+
void FileSystemDock::_file_selected() {
import_dock_needs_update = true;
@@ -1697,6 +1715,7 @@ void FileSystemDock::_update_import_dock() {
void FileSystemDock::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_files_gui_input"), &FileSystemDock::_files_gui_input);
ClassDB::bind_method(D_METHOD("_update_tree"), &FileSystemDock::_update_tree);
ClassDB::bind_method(D_METHOD("_rescan"), &FileSystemDock::_rescan);
ClassDB::bind_method(D_METHOD("_favorites_pressed"), &FileSystemDock::_favorites_pressed);
@@ -1743,6 +1762,10 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
editor = p_editor;
path = "res://";
+ ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KEY_MASK_CMD | KEY_C);
+ ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KEY_MASK_CMD | KEY_D);
+ ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), KEY_DELETE);
+
HBoxContainer *toolbar_hbc = memnew(HBoxContainer);
add_child(toolbar_hbc);
@@ -1849,6 +1872,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
files->set_select_mode(ItemList::SELECT_MULTI);
files->set_drag_forwarding(this);
files->connect("item_rmb_selected", this, "_files_list_rmb_select");
+ files->connect("gui_input", this, "_files_gui_input");
files->connect("item_selected", this, "_file_selected");
files->connect("multi_selected", this, "_file_multi_selected");
files->connect("rmb_clicked", this, "_rmb_pressed");
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 2e86b83efc..377316d1ba 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -159,6 +159,8 @@ private:
bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths);
void _update_tree(bool keep_collapse_state, bool p_uncollapse_root = false);
+ void _files_gui_input(Ref<InputEvent> p_event);
+
void _update_files(bool p_keep_selection);
void _update_file_display_toggle_button();
void _change_file_display();
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 215964235e..5197d3d888 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -30,6 +30,7 @@
#include "editor_preview_plugins.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "io/file_access_memory.h"
@@ -39,6 +40,38 @@
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
+static void post_process_preview(Ref<Image> p_image) {
+
+ if (p_image->get_format() != Image::FORMAT_RGBA8)
+ p_image->convert(Image::FORMAT_RGBA8);
+
+ p_image->lock();
+
+ const int w = p_image->get_width();
+ const int h = p_image->get_height();
+
+ const int r = MIN(w, h) / 32;
+ const int r2 = r * r;
+ Color transparent = Color(0, 0, 0, 0);
+
+ for (int i = 0; i < r; i++) {
+ for (int j = 0; j < r; j++) {
+ int dx = i - r;
+ int dy = j - r;
+ if (dx * dx + dy * dy > r2) {
+ p_image->set_pixel(i, j, transparent);
+ p_image->set_pixel(w - 1 - i, j, transparent);
+ p_image->set_pixel(w - 1 - i, h - 1 - j, transparent);
+ p_image->set_pixel(i, h - 1 - j, transparent);
+ } else {
+ break;
+ }
+ }
+ }
+
+ p_image->unlock();
+}
+
bool EditorTexturePreviewPlugin::handles(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "Texture");
@@ -90,6 +123,7 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from) {
}
img->resize(width, height);
+ post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
@@ -162,6 +196,7 @@ Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES &p_from) {
}
img->resize(width, height);
+ post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
@@ -203,6 +238,7 @@ Ref<Texture> EditorPackedScenePreviewPlugin::generate_from_path(const String &p_
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
+ post_process_preview(img);
ptex->create_from_image(img, 0);
return ptex;
@@ -258,6 +294,7 @@ Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES &p_from) {
thumbnail_size *= EDSCALE;
img->convert(Image::FORMAT_RGBA8);
img->resize(thumbnail_size, thumbnail_size);
+ post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
ptex->create_from_image(img, 0);
return ptex;
@@ -426,19 +463,36 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
img->create(thumbnail_size, thumbnail_size, 0, Image::FORMAT_RGBA8);
Color bg_color = EditorSettings::get_singleton()->get("text_editor/highlighting/background_color");
- bg_color.a = 1.0;
Color keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color");
Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color");
+ if (EditorSettings::get_singleton()->get("text_editor/theme/color_theme") == "Adaptive") {
+ Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
+
+ bg_color = tm->get_color("text_editor/theme/background_color", "Editor");
+ keyword_color = tm->get_color("text_editor/theme/keyword_color", "Editor");
+ text_color = tm->get_color("text_editor/theme/text_color", "Editor");
+ symbol_color = tm->get_color("text_editor/theme/symbol_color", "Editor");
+ }
+
img->lock();
+ if (bg_color.a == 0)
+ bg_color = Color(0, 0, 0, 0);
+ bg_color.a = MAX(bg_color.a, 0.2); // some background
+
for (int i = 0; i < thumbnail_size; i++) {
for (int j = 0; j < thumbnail_size; j++) {
img->set_pixel(i, j, bg_color);
}
}
+ const int x0 = thumbnail_size / 8;
+ const int y0 = thumbnail_size / 8;
+ const int available_height = thumbnail_size - 2 * y0;
+ col = x0;
+
bool prev_is_text = false;
bool in_keyword = false;
for (int i = 0; i < code.length(); i++) {
@@ -471,8 +525,8 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
Color ul = color;
ul.a *= 0.5;
- img->set_pixel(col, line * 2, bg_color.blend(ul));
- img->set_pixel(col, line * 2 + 1, color);
+ img->set_pixel(col, y0 + line * 2, bg_color.blend(ul));
+ img->set_pixel(col, y0 + line * 2 + 1, color);
prev_is_text = _is_text_char(c);
}
@@ -482,9 +536,9 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
in_keyword = false;
if (c == '\n') {
- col = 0;
+ col = x0;
line++;
- if (line >= thumbnail_size / 2)
+ if (line >= available_height / 2)
break;
} else if (c == '\t') {
col += 3;
@@ -495,6 +549,8 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
img->unlock();
+ post_process_preview(img);
+
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
ptex->create_from_image(img, 0);
@@ -762,6 +818,7 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
}
imgdata = PoolVector<uint8_t>::Write();
+ post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>( memnew( ImageTexture));
ptex->create_from_image(Image(w,h,0,Image::FORMAT_RGB8,img),0);
@@ -831,6 +888,7 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from) {
thumbnail_size *= EDSCALE;
img->convert(Image::FORMAT_RGBA8);
img->resize(thumbnail_size, thumbnail_size);
+ post_process_preview(img);
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
ptex->create_from_image(img, 0);
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index b116dfdcf7..69503e631c 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1308,6 +1308,35 @@ void VisualScriptEditor::_input(const Ref<InputEvent> &p_event) {
}
}
+void VisualScriptEditor::_members_gui_input(const Ref<InputEvent> &p_event) {
+
+ Ref<InputEventKey> key = p_event;
+ if (key.is_valid() && key->is_pressed() && !key->is_echo()) {
+ if (members->has_focus()) {
+ TreeItem *ti = members->get_selected();
+ if (ti) {
+ TreeItem *root = members->get_root();
+ if (ti->get_parent() == root->get_children()) {
+ member_type = MEMBER_FUNCTION;
+ }
+ if (ti->get_parent() == root->get_children()->get_next()) {
+ member_type = MEMBER_VARIABLE;
+ }
+ if (ti->get_parent() == root->get_children()->get_next()->get_next()) {
+ member_type = MEMBER_SIGNAL;
+ }
+ member_name = ti->get_text(0);
+ }
+ if (ED_IS_SHORTCUT("visual_script_editor/delete_selected", p_event)) {
+ _member_option(MEMBER_REMOVE);
+ }
+ if (ED_IS_SHORTCUT("visual_script_editor/edit_member", p_event)) {
+ _member_option(MEMBER_EDIT);
+ }
+ }
+ }
+}
+
Variant VisualScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
if (p_from == nodes) {
@@ -3090,7 +3119,7 @@ void VisualScriptEditor::_member_rmb_selected(const Vector2 &p_pos) {
member_type = MEMBER_FUNCTION;
member_name = ti->get_text(0);
- member_popup->add_icon_item(del_icon, TTR("Remove Function"), MEMBER_REMOVE);
+ member_popup->add_icon_shortcut(del_icon, ED_GET_SHORTCUT("visual_script_editor/delete_selected"), MEMBER_REMOVE);
member_popup->popup();
return;
}
@@ -3099,9 +3128,9 @@ void VisualScriptEditor::_member_rmb_selected(const Vector2 &p_pos) {
member_type = MEMBER_VARIABLE;
member_name = ti->get_text(0);
- member_popup->add_icon_item(edit_icon, TTR("Edit Variable"), MEMBER_EDIT);
+ member_popup->add_icon_shortcut(edit_icon, ED_GET_SHORTCUT("visual_script_editor/edit_member"), MEMBER_EDIT);
member_popup->add_separator();
- member_popup->add_icon_item(del_icon, TTR("Remove Variable"), MEMBER_REMOVE);
+ member_popup->add_icon_shortcut(del_icon, ED_GET_SHORTCUT("visual_script_editor/delete_selected"), MEMBER_REMOVE);
member_popup->popup();
return;
}
@@ -3110,9 +3139,9 @@ void VisualScriptEditor::_member_rmb_selected(const Vector2 &p_pos) {
member_type = MEMBER_SIGNAL;
member_name = ti->get_text(0);
- member_popup->add_icon_item(edit_icon, TTR("Edit Signal"), MEMBER_EDIT);
+ member_popup->add_icon_shortcut(edit_icon, ED_GET_SHORTCUT("visual_script_editor/edit_member"), MEMBER_EDIT);
member_popup->add_separator();
- member_popup->add_icon_item(del_icon, TTR("Remove Signal"), MEMBER_REMOVE);
+ member_popup->add_icon_shortcut(del_icon, ED_GET_SHORTCUT("visual_script_editor/delete_selected"), MEMBER_REMOVE);
member_popup->popup();
return;
}
@@ -3243,6 +3272,7 @@ void VisualScriptEditor::_bind_methods() {
ClassDB::bind_method("drop_data_fw", &VisualScriptEditor::drop_data_fw);
ClassDB::bind_method("_input", &VisualScriptEditor::_input);
+ ClassDB::bind_method("_members_gui_input", &VisualScriptEditor::_members_gui_input);
ClassDB::bind_method("_on_nodes_delete", &VisualScriptEditor::_on_nodes_delete);
ClassDB::bind_method("_on_nodes_duplicate", &VisualScriptEditor::_on_nodes_duplicate);
@@ -3305,6 +3335,7 @@ VisualScriptEditor::VisualScriptEditor() {
members->connect("button_pressed", this, "_member_button");
members->connect("item_edited", this, "_member_edited");
members->connect("cell_selected", this, "_member_selected", varray(), CONNECT_DEFERRED);
+ members->connect("gui_input", this, "_members_gui_input");
members->set_allow_reselect(true);
members->set_hide_folding(true);
members->set_drag_forwarding(this);
@@ -3478,12 +3509,13 @@ static void register_editor_callback() {
ScriptEditor::register_create_script_editor_function(create_editor);
- ED_SHORTCUT("visual_script_editor/delete_selected", TTR("Delete Selected"));
+ ED_SHORTCUT("visual_script_editor/delete_selected", TTR("Delete Selected"), KEY_DELETE);
ED_SHORTCUT("visual_script_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9);
ED_SHORTCUT("visual_script_editor/find_node_type", TTR("Find Node Type"), KEY_MASK_CMD + KEY_F);
ED_SHORTCUT("visual_script_editor/copy_nodes", TTR("Copy Nodes"), KEY_MASK_CMD + KEY_C);
ED_SHORTCUT("visual_script_editor/cut_nodes", TTR("Cut Nodes"), KEY_MASK_CMD + KEY_X);
ED_SHORTCUT("visual_script_editor/paste_nodes", TTR("Paste Nodes"), KEY_MASK_CMD + KEY_V);
+ ED_SHORTCUT("visual_script_editor/edit_member", TTR("Edit Member"), KEY_MASK_CMD + KEY_E);
}
void VisualScriptEditor::register_editor() {
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index 4d789e6ef7..80bbf142d9 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -211,6 +211,7 @@ class VisualScriptEditor : public ScriptEditorBase {
String revert_on_drag;
void _input(const Ref<InputEvent> &p_event);
+ void _members_gui_input(const Ref<InputEvent> &p_event);
void _on_nodes_delete();
void _on_nodes_duplicate();
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 2b3743b066..b8a9ed482c 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -179,7 +179,7 @@ def configure(env):
if env["bits"] == "64":
env.Append(CCFLAGS=['/D_WIN64'])
- LIBS = ['winmm', 'opengl32', 'dsound', 'kernel32', 'ole32', 'oleaut32', 'user32', 'gdi32', 'IPHLPAPI', 'Shlwapi', 'wsock32', 'Ws2_32', 'shell32', 'advapi32', 'dinput8', 'dxguid', 'Imm32']
+ LIBS = ['winmm', 'opengl32', 'dsound', 'kernel32', 'ole32', 'oleaut32', 'user32', 'gdi32', 'IPHLPAPI', 'Shlwapi', 'wsock32', 'Ws2_32', 'shell32', 'advapi32', 'dinput8', 'dxguid', 'imm32']
env.Append(LINKFLAGS=[p + env["LIBSUFFIX"] for p in LIBS])
env.Append(LIBPATH=[os.getenv("WindowsSdkDir") + "/Lib"])
@@ -281,7 +281,7 @@ def configure(env):
env.Append(CCFLAGS=['-DRTAUDIO_ENABLED'])
env.Append(CCFLAGS=['-DWASAPI_ENABLED'])
env.Append(CCFLAGS=['-DWINVER=%s' % env['target_win_version'], '-D_WIN32_WINNT=%s' % env['target_win_version']])
- env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser', 'Imm32'])
+ env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser', 'imm32'])
env.Append(CPPFLAGS=['-DMINGW_ENABLED'])
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 94ce3590d7..94c54c91d3 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -361,8 +361,8 @@ void CapsuleMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CapsuleMesh::set_rings);
ClassDB::bind_method(D_METHOD("get_rings"), &CapsuleMesh::get_rings);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "mid_height", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_mid_height", "get_mid_height");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "mid_height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_mid_height", "get_mid_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings");
}
@@ -823,9 +823,9 @@ void CylinderMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_rings", "rings"), &CylinderMesh::set_rings);
ClassDB::bind_method(D_METHOD("get_rings"), &CylinderMesh::get_rings);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "top_radius", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_top_radius", "get_top_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "bottom_radius", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_bottom_radius", "get_bottom_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "top_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_top_radius", "get_top_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "bottom_radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_bottom_radius", "get_bottom_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings");
}
@@ -1224,7 +1224,7 @@ void PrismMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_subdivide_depth"), &PrismMesh::get_subdivide_depth);
ADD_PROPERTY(PropertyInfo(Variant::REAL, "left_to_right", PROPERTY_HINT_RANGE, "-2.0,2.0,0.1"), "set_left_to_right", "get_left_to_right");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_size", "get_size");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_width", PROPERTY_HINT_RANGE, "0,100,1"), "set_subdivide_width", "get_subdivide_width");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_height", PROPERTY_HINT_RANGE, "0,100,1"), "set_subdivide_height", "get_subdivide_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "subdivide_depth", PROPERTY_HINT_RANGE, "0,100,1"), "set_subdivide_depth", "get_subdivide_depth");
@@ -1441,8 +1441,8 @@ void SphereMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_is_hemisphere", "is_hemisphere"), &SphereMesh::set_is_hemisphere);
ClassDB::bind_method(D_METHOD("get_is_hemisphere"), &SphereMesh::get_is_hemisphere);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_radius", "get_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.1,100.0,0.1"), "set_height", "get_height");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.001,100.0,0.001"), "set_height", "get_height");
ADD_PROPERTY(PropertyInfo(Variant::INT, "radial_segments", PROPERTY_HINT_RANGE, "1,100,1"), "set_radial_segments", "get_radial_segments");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rings", PROPERTY_HINT_RANGE, "1,100,1"), "set_rings", "get_rings");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "is_hemisphere"), "set_is_hemisphere", "get_is_hemisphere");