summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_file_dialog.cpp2
-rw-r--r--editor/editor_file_system.cpp12
-rw-r--r--editor/editor_file_system.h2
-rw-r--r--editor/editor_inspector.cpp7
-rw-r--r--editor/editor_node.cpp8
-rw-r--r--editor/editor_profiler.cpp2
-rw-r--r--editor/editor_properties.cpp10
-rw-r--r--editor/editor_properties.h2
-rw-r--r--editor/editor_themes.cpp8
-rw-r--r--editor/find_in_files.cpp13
-rw-r--r--editor/import/editor_import_collada.cpp2
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp12
-rw-r--r--editor/import/resource_importer_scene.cpp34
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/inspector_dock.cpp15
-rw-r--r--editor/inspector_dock.h1
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp6
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp13
-rw-r--r--editor/project_export.cpp6
-rw-r--r--editor/scene_tree_dock.cpp2
-rw-r--r--editor/script_editor_debugger.cpp30
-rw-r--r--editor/spatial_editor_gizmos.cpp25
23 files changed, 134 insertions, 82 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 38bdba31ea..f425d0a995 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -501,7 +501,7 @@ void EditorFileDialog::_items_clear_selection() {
case MODE_OPEN_FILE:
case MODE_OPEN_FILES:
get_ok()->set_text(TTR("Open"));
- get_ok()->set_disabled(item_list->is_anything_selected() == false);
+ get_ok()->set_disabled(!item_list->is_anything_selected());
break;
case MODE_OPEN_DIR:
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index ee20d95f25..d73bf86f64 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1705,6 +1705,17 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
emit_signal("resources_reimported", p_files);
}
+Error EditorFileSystem::_resource_import(const String &p_path) {
+
+ Vector<String> files;
+ files.push_back(p_path);
+
+ singleton->update_file(p_path);
+ singleton->reimport_files(files);
+
+ return OK;
+}
+
void EditorFileSystem::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_filesystem"), &EditorFileSystem::get_filesystem);
@@ -1744,6 +1755,7 @@ void EditorFileSystem::_update_extensions() {
EditorFileSystem::EditorFileSystem() {
+ ResourceLoader::import = _resource_import;
reimport_on_missing_imported_files = GLOBAL_DEF("editor/reimport_missing_imported_files", true);
singleton = this;
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index f2f72eddbd..47077425a1 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -230,6 +230,8 @@ class EditorFileSystem : public Node {
String _get_global_script_class(const String &p_type, const String &p_path, String *r_extends, String *r_icon_path) const;
+ static Error _resource_import(const String &p_path);
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index c6258c8493..a90f15004a 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -2139,6 +2139,13 @@ void EditorInspector::_notification(int p_what) {
}
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+
+ if (use_sub_inspector_bg) {
+ add_style_override("bg", get_stylebox("sub_inspector_bg", "Editor"));
+ } else if (is_inside_tree()) {
+ add_style_override("bg", get_stylebox("bg", "Tree"));
+ }
+
update_tree();
}
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 790e38afca..18dd85617b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -227,12 +227,6 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
_editor_select_prev();
}
- if (k->get_scancode() == KEY_ESCAPE) {
- for (int i = 0; i < bottom_panel_items.size(); i++) {
- _bottom_panel_switch(false, i);
- }
- }
-
if (old_editor != editor_plugin_screen) {
get_tree()->set_input_as_handled();
}
@@ -3889,7 +3883,7 @@ void EditorNode::_scene_tab_closed(int p_tab) {
}
void EditorNode::_scene_tab_hover(int p_tab) {
- if (bool(EDITOR_GET("interface/scene_tabs/show_thumbnail_on_hover")) == false) {
+ if (!bool(EDITOR_GET("interface/scene_tabs/show_thumbnail_on_hover"))) {
return;
}
int current_tab = scene_tabs->get_current_tab();
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index b57e3826c6..d3978749c0 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -257,7 +257,7 @@ void EditorProfiler::_update_plot() {
//get
const Metric &m = frame_metrics[idx];
- if (m.valid == false)
+ if (!m.valid)
continue; //skip because invalid
float value = 0;
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index c5c78b2590..6eba9a9b67 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2102,12 +2102,18 @@ void EditorPropertyResource::_menu_option(int p_which) {
}
}
-void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<Texture> &p_preview, ObjectID p_obj) {
+void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<Texture> &p_preview, const Ref<Texture> &p_small_preview, ObjectID p_obj) {
RES p = get_edited_object()->get(get_edited_property());
if (p.is_valid() && p->get_instance_id() == p_obj) {
+ String type = p->get_class_name();
+
+ if (ClassDB::is_parent_class(type, "Script")) {
+ assign->set_text(p->get_path().get_file());
+ return;
+ }
+
if (p_preview.is_valid()) {
- String type = p->get_class_name();
preview->set_margin(MARGIN_LEFT, assign->get_icon()->get_width() + assign->get_stylebox("normal")->get_default_margin(MARGIN_LEFT) + get_constant("hseparation", "Button"));
if (type == "GradientTexture") {
preview->set_stretch_mode(TextureRect::STRETCH_SCALE);
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 18e70345aa..35d8f4d306 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -548,7 +548,7 @@ class EditorPropertyResource : public EditorProperty {
void _file_selected(const String &p_path);
void _menu_option(int p_which);
- void _resource_preview(const String &p_path, const Ref<Texture> &p_preview, ObjectID p_obj);
+ void _resource_preview(const String &p_path, const Ref<Texture> &p_preview, const Ref<Texture> &p_small_preview, ObjectID p_obj);
void _resource_selected();
void _viewport_selected(const NodePath &p_path);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 768a8fc066..36053d7534 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -635,7 +635,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("visibility_hidden", "PopupMenu", theme->get_icon("GuiVisibilityHidden", "EditorIcons"));
theme->set_icon("visibility_visible", "PopupMenu", theme->get_icon("GuiVisibilityVisible", "EditorIcons"));
theme->set_icon("visibility_xray", "PopupMenu", theme->get_icon("GuiVisibilityXray", "EditorIcons"));
- theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size) * EDSCALE);
+ theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size + 1) * EDSCALE);
Ref<StyleBoxFlat> sub_inspector_bg = make_flat_stylebox(dark_color_1, 2, 0, 0, 0);
sub_inspector_bg->set_border_width(MARGIN_LEFT, 2);
@@ -734,10 +734,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("font_color", "ItemList", font_color);
theme->set_color("font_color_selected", "ItemList", mono_color);
theme->set_color("guide_color", "ItemList", guide_color);
- theme->set_constant("vseparation", "ItemList", 2 * EDSCALE);
- theme->set_constant("hseparation", "ItemList", 2 * EDSCALE);
+ theme->set_constant("vseparation", "ItemList", 3 * EDSCALE);
+ theme->set_constant("hseparation", "ItemList", 3 * EDSCALE);
theme->set_constant("icon_margin", "ItemList", default_margin_size * EDSCALE);
- theme->set_constant("line_separation", "ItemList", 2 * EDSCALE);
+ theme->set_constant("line_separation", "ItemList", 3 * EDSCALE);
// Tabs & TabContainer
theme->set_stylebox("tab_fg", "TabContainer", style_tab_selected);
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 2af81b8ac7..f88d1b24a6 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -31,6 +31,7 @@
#include "find_in_files.h"
#include "core/os/dir_access.h"
#include "core/os/os.h"
+#include "editor_node.h"
#include "editor_scale.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
@@ -300,7 +301,7 @@ const char *FindInFilesDialog::SIGNAL_REPLACE_REQUESTED = "replace_requested";
FindInFilesDialog::FindInFilesDialog() {
- set_custom_minimum_size(Size2(400, 190));
+ set_custom_minimum_size(Size2(400, 190) * EDSCALE);
set_resizable(true);
set_title(TTR("Find in Files"));
@@ -334,12 +335,12 @@ FindInFilesDialog::FindInFilesDialog() {
HBoxContainer *hbc = memnew(HBoxContainer);
_whole_words_checkbox = memnew(CheckBox);
- _whole_words_checkbox->set_text(TTR("Whole words"));
+ _whole_words_checkbox->set_text(TTR("Whole Words"));
_whole_words_checkbox->set_pressed(true);
hbc->add_child(_whole_words_checkbox);
_match_case_checkbox = memnew(CheckBox);
- _match_case_checkbox->set_text(TTR("Match case"));
+ _match_case_checkbox->set_text(TTR("Match Case"));
_match_case_checkbox->set_pressed(true);
hbc->add_child(_match_case_checkbox);
@@ -548,7 +549,7 @@ FindInFilesPanel::FindInFilesPanel() {
hbc->add_child(find_label);
_search_text_label = memnew(Label);
- _search_text_label->add_font_override("font", get_font("source", "EditorFonts"));
+ _search_text_label->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("source", "EditorFonts"));
hbc->add_child(_search_text_label);
_progress_bar = memnew(ProgressBar);
@@ -569,7 +570,7 @@ FindInFilesPanel::FindInFilesPanel() {
}
_results_display = memnew(Tree);
- _results_display->add_font_override("font", get_font("source", "EditorFonts"));
+ _results_display->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("source", "EditorFonts"));
_results_display->set_v_size_flags(SIZE_EXPAND_FILL);
_results_display->connect("item_selected", this, "_on_result_selected");
_results_display->connect("item_edited", this, "_on_item_edited");
@@ -702,7 +703,7 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin
r.begin = begin;
r.end = end;
r.draw_begin = (item_text_width - raw_text_width) + font->get_string_size(text.left(r.begin)).x;
- r.draw_width = font->get_string_size(text.substr(r.begin, r.end - r.begin + 1)).x;
+ r.draw_width = font->get_string_size(text.substr(r.begin, r.end - r.begin)).x;
_result_items[item] = r;
if (_with_replace) {
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 60ca66e464..e8bb772a64 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -321,7 +321,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
} else {
//mesh since nothing else
node = memnew(MeshInstance);
- Object::cast_to<MeshInstance>(node)->set_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT, true);
+ //Object::cast_to<MeshInstance>(node)->set_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT, true);
}
} break;
case Collada::Node::TYPE_SKELETON: {
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index a6b754de3b..cb15be35f2 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -1793,22 +1793,22 @@ template <>
struct EditorSceneImporterGLTFInterpolate<Quat> {
Quat lerp(const Quat &a, const Quat &b, float c) const {
- ERR_FAIL_COND_V(a.is_normalized() == false, Quat());
- ERR_FAIL_COND_V(b.is_normalized() == false, Quat());
+ ERR_FAIL_COND_V(!a.is_normalized(), Quat());
+ ERR_FAIL_COND_V(!b.is_normalized(), Quat());
return a.slerp(b, c).normalized();
}
Quat catmull_rom(const Quat &p0, const Quat &p1, const Quat &p2, const Quat &p3, float c) {
- ERR_FAIL_COND_V(p1.is_normalized() == false, Quat());
- ERR_FAIL_COND_V(p2.is_normalized() == false, Quat());
+ ERR_FAIL_COND_V(!p1.is_normalized(), Quat());
+ ERR_FAIL_COND_V(!p2.is_normalized(), Quat());
return p1.slerp(p2, c).normalized();
}
Quat bezier(Quat start, Quat control_1, Quat control_2, Quat end, float t) {
- ERR_FAIL_COND_V(start.is_normalized() == false, Quat());
- ERR_FAIL_COND_V(end.is_normalized() == false, Quat());
+ ERR_FAIL_COND_V(!start.is_normalized(), Quat());
+ ERR_FAIL_COND_V(!end.is_normalized(), Quat());
return start.slerp(end, t).normalized();
}
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 6d72cb4909..c5a5980fc1 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -365,29 +365,37 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
return p_node;
MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
if (mi) {
- Node *col;
+ Node *col = NULL;
if (_teststr(name, "colonly")) {
col = mi->create_trimesh_collision_node();
- ERR_FAIL_COND_V(!col, NULL);
+ if (col == NULL) {
+ ERR_PRINTS("Error generating collision for mesh: " + name);
+ } else {
- col->set_name(_fixstr(name, "colonly"));
+ col->set_name(_fixstr(name, "colonly"));
+ }
} else {
col = mi->create_convex_collision_node();
- ERR_FAIL_COND_V(!col, NULL);
+ if (col == NULL) {
+ ERR_PRINTS("Error generating collision for mesh: " + name);
+ } else {
- col->set_name(_fixstr(name, "convcolonly"));
+ col->set_name(_fixstr(name, "convcolonly"));
+ }
}
- Object::cast_to<Spatial>(col)->set_transform(mi->get_transform());
- p_node->replace_by(col);
- memdelete(p_node);
- p_node = col;
+ if (col) {
+ Object::cast_to<Spatial>(col)->set_transform(mi->get_transform());
+ p_node->replace_by(col);
+ memdelete(p_node);
+ p_node = col;
- StaticBody *sb = Object::cast_to<StaticBody>(col);
- CollisionShape *colshape = Object::cast_to<CollisionShape>(sb->get_child(0));
- colshape->set_name("shape");
- colshape->set_owner(p_node->get_owner());
+ StaticBody *sb = Object::cast_to<StaticBody>(col);
+ CollisionShape *colshape = Object::cast_to<CollisionShape>(sb->get_child(0));
+ colshape->set_name("shape");
+ colshape->set_owner(p_node->get_owner());
+ }
} else if (p_node->has_meta("empty_draw_type")) {
String empty_draw_type = String(p_node->get_meta("empty_draw_type"));
StaticBody *sb = memnew(StaticBody);
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index b046e2e975..b81a52ab70 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -116,7 +116,7 @@ class ResourceImporterScene : public ResourceImporter {
enum LightBakeMode {
LIGHT_BAKE_DISABLED,
LIGHT_BAKE_ENABLE,
- //LIGHT_BAKE_LIGHTMAPS
+ LIGHT_BAKE_LIGHTMAPS
};
void _replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 4f4980d83c..750fca2852 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -328,6 +328,21 @@ Container *InspectorDock::get_addon_area() {
return this;
}
+void InspectorDock::_notification(int p_what) {
+ switch (p_what) {
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ set_theme(editor->get_gui_base()->get_theme());
+ resource_new_button->set_icon(get_icon("New", "EditorIcons"));
+ resource_load_button->set_icon(get_icon("Load", "EditorIcons"));
+ backward_button->set_icon(get_icon("Back", "EditorIcons"));
+ forward_button->set_icon(get_icon("Forward", "EditorIcons"));
+ history_menu->set_icon(get_icon("History", "EditorIcons"));
+ object_menu->set_icon(get_icon("Tools", "EditorIcons"));
+ warning->set_icon(get_icon("NodeWarning", "EditorIcons"));
+ } break;
+ }
+}
+
void InspectorDock::_bind_methods() {
ClassDB::bind_method("_menu_option", &InspectorDock::_menu_option);
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 97ef6899dc..57d2a03295 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -118,6 +118,7 @@ class InspectorDock : public VBoxContainer {
protected:
static void _bind_methods();
+ void _notification(int p_what);
public:
void go_back();
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index e8f00ce0ba..a9bc5e77ac 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5113,7 +5113,7 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2 &p_point, const Varian
type == "AtlasTexture" ||
type == "LargeTexture") {
Ref<Texture> texture = Ref<Texture>(Object::cast_to<Texture>(*res));
- if (texture.is_valid() == false) {
+ if (!texture.is_valid()) {
continue;
}
} else {
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 7cda15bdc6..7e11c4a253 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1960,7 +1960,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
// doesn't have it, make a new one
- ScriptEditorBase *se;
+ ScriptEditorBase *se = NULL;
for (int i = script_editor_func_count - 1; i >= 0; i--) {
se = script_editor_funcs[i](p_resource);
@@ -3173,9 +3173,9 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
find_in_files_dialog->connect(FindInFilesDialog::SIGNAL_REPLACE_REQUESTED, this, "_start_find_in_files", varray(true));
add_child(find_in_files_dialog);
find_in_files = memnew(FindInFilesPanel);
- find_in_files_button = editor->add_bottom_panel_item(TTR("Search results"), find_in_files);
+ find_in_files_button = editor->add_bottom_panel_item(TTR("Search Results"), find_in_files);
find_in_files_button->set_tooltip(TTR("Search in files"));
- find_in_files->set_custom_minimum_size(Size2(0, 200));
+ find_in_files->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected");
find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files");
find_in_files->hide();
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 114610c562..f57614b3b3 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -534,9 +534,9 @@ void SpatialEditorViewport::_update_name() {
String view_mode = orthogonal ? TTR("Orthogonal") : TTR("Perspective");
if (name != "")
- view_menu->set_text("[ " + name + " " + view_mode + " ]");
+ view_menu->set_text(name + " " + view_mode);
else
- view_menu->set_text("[ " + view_mode + " ]");
+ view_menu->set_text(view_mode);
view_menu->set_size(Vector2(0, 0)); // resets the button size
}
@@ -2124,7 +2124,7 @@ void SpatialEditorViewport::_notification(int p_what) {
_update_freelook(delta);
Node *scene_root = editor->get_scene_tree_dock()->get_editor_data()->get_edited_scene_root();
- if (previewing_cinema == true && scene_root != NULL) {
+ if (previewing_cinema && scene_root != NULL) {
Camera *cam = scene_root->get_viewport()->get_camera();
if (cam != NULL && cam != previewing) {
//then switch the viewport's camera to the scene's viewport camera
@@ -2260,6 +2260,12 @@ void SpatialEditorViewport::_notification(int p_what) {
surface->connect("mouse_exited", this, "_surface_mouse_exit");
surface->connect("focus_entered", this, "_surface_focus_enter");
surface->connect("focus_exited", this, "_surface_focus_exit");
+ view_menu->set_flat(false);
+ view_menu->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
+ view_menu->add_style_override("hover", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
+ view_menu->add_style_override("pressed", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
+ view_menu->add_style_override("focus", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
+ view_menu->add_style_override("disabled", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
info_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
fps_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
cinema_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
@@ -3421,7 +3427,6 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu = memnew(MenuButton);
surface->add_child(view_menu);
view_menu->set_position(Point2(4, 4) * EDSCALE);
- view_menu->set_self_modulate(Color(1, 1, 1, 0.5));
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/top_view"), VIEW_TOP);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/bottom_view"), VIEW_BOTTOM);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/left_view"), VIEW_LEFT);
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index fa6dce1771..3ec49e187f 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -638,10 +638,10 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
TreeItem *subdir = include_files->create_item(p_item);
- if (_fill_tree(p_dir->get_subdir(i), subdir, current, p_only_scenes) == false) {
- memdelete(subdir);
- } else {
+ if (_fill_tree(p_dir->get_subdir(i), subdir, current, p_only_scenes)) {
used = true;
+ } else {
+ memdelete(subdir);
}
}
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 08f1ece2d4..a6a014f3bd 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -797,7 +797,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
case TOOL_CREATE_USER_INTERFACE:
case TOOL_CREATE_FAVORITE: {
- Node *new_node;
+ Node *new_node = NULL;
if (TOOL_CREATE_FAVORITE == p_tool) {
String name = selected_favorite_root.get_slicec(' ', 0);
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index eb72d0aa6e..6fbac0d4b5 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -493,23 +493,29 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
pinfo.usage = PropertyUsageFlags(int(prop[4]));
Variant var = prop[5];
+ if (pinfo.type == Variant::OBJECT) {
+ if (var.is_zero()) {
+ var = RES();
+ } else if (var.get_type() == Variant::STRING) {
+ var = ResourceLoader::load(var);
+
+ if (pinfo.hint_string == "Script")
+ debugObj->set_script(var);
+ } else if (var.get_type() == Variant::OBJECT) {
+ if (((Object *)var)->is_class("EncodedObjectAsID")) {
+ var = Object::cast_to<EncodedObjectAsID>(var)->get_object_id();
+ pinfo.type = var.get_type();
+ pinfo.hint = PROPERTY_HINT_OBJECT_ID;
+ pinfo.hint_string = "Object";
+ }
+ }
+ }
+
if (is_new_object) {
//don't update.. it's the same, instead refresh
debugObj->prop_list.push_back(pinfo);
}
- if (var.get_type() == Variant::STRING) {
- String str = var;
- var = str.substr(4, str.length());
-
- if (str.begins_with("PATH")) {
- if (String(var).empty())
- var = RES();
- else
- var = ResourceLoader::load(var);
- }
- }
-
debugObj->prop_values[pinfo.name] = var;
}
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 96bca86f83..a321cb16c5 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -4201,21 +4201,16 @@ void JointSpatialGizmoPlugin::CreateGeneric6DOFJointGizmo(
float cs = 0.25;
for (int ax = 0; ax < 3; ax++) {
- /*r_points.push_back(p_offset.translated(Vector3(+cs,0,0)).origin);
- r_points.push_back(p_offset.translated(Vector3(-cs,0,0)).origin);
- r_points.push_back(p_offset.translated(Vector3(0,+cs,0)).origin);
- r_points.push_back(p_offset.translated(Vector3(0,-cs,0)).origin);
- r_points.push_back(p_offset.translated(Vector3(0,0,+cs*2)).origin);
- r_points.push_back(p_offset.translated(Vector3(0,0,-cs*2)).origin); */
-
- float ll;
- float ul;
- float lll;
- float lul;
-
- int a1, a2, a3;
- bool enable_ang;
- bool enable_lin;
+ float ll = 0;
+ float ul = 0;
+ float lll = 0;
+ float lul = 0;
+
+ int a1 = 0;
+ int a2 = 0;
+ int a3 = 0;
+ bool enable_ang = false;
+ bool enable_lin = false;
switch (ax) {
case 0: