diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 33 | ||||
-rw-r--r-- | editor/animation_track_editor.h | 3 | ||||
-rw-r--r-- | editor/connections_dialog.cpp | 1 | ||||
-rw-r--r-- | editor/dependency_editor.cpp | 2 | ||||
-rw-r--r-- | editor/editor_fonts.cpp | 2 | ||||
-rw-r--r-- | editor/editor_help.cpp | 4 | ||||
-rw-r--r-- | editor/editor_properties.cpp | 28 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 2 | ||||
-rw-r--r-- | editor/icons/icon_crypto_key.svg | 1 | ||||
-rw-r--r-- | editor/icons/icon_x509_certificate.svg | 1 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 2 | ||||
-rw-r--r-- | editor/node_dock.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 22 | ||||
-rw-r--r-- | editor/project_export.cpp | 4 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 2 |
16 files changed, 55 insertions, 57 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 74e8df60f9..7183d34d4f 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -5727,16 +5727,24 @@ void AnimationTrackEditor::_show_imported_anim_warning() const { } void AnimationTrackEditor::_select_all_tracks_for_copy() { + TreeItem *track = track_copy_select->get_root()->get_children(); + if (!track) + return; + + bool all_selected = true; + while (track) { + if (!track->is_checked(0)) + all_selected = false; + + track = track->get_next(); + } + + track = track_copy_select->get_root()->get_children(); while (track) { - track->set_checked(0, selected_all_tracks); + track->set_checked(0, !all_selected); track = track->get_next(); } - selected_all_tracks = !selected_all_tracks; - if (selected_all_tracks) - select_all_button->set_text(TTR("Select All")); - else - select_all_button->set_text(TTR("Select None")); } void AnimationTrackEditor::_bind_methods() { @@ -6067,25 +6075,22 @@ AnimationTrackEditor::AnimationTrackEditor() { track_copy_dialog = memnew(ConfirmationDialog); add_child(track_copy_dialog); - track_copy_dialog->set_title(TTR("Select tracks to copy:")); + track_copy_dialog->set_title(TTR("Select Tracks to Copy")); track_copy_dialog->get_ok()->set_text(TTR("Copy")); VBoxContainer *track_vbox = memnew(VBoxContainer); track_copy_dialog->add_child(track_vbox); - selected_all_tracks = true; + Button *select_all_button = memnew(Button); + select_all_button->set_text(TTR("Select All/None")); + select_all_button->connect("pressed", this, "_select_all_tracks_for_copy"); + track_vbox->add_child(select_all_button); track_copy_select = memnew(Tree); track_copy_select->set_h_size_flags(SIZE_EXPAND_FILL); track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL); track_copy_select->set_hide_root(true); track_vbox->add_child(track_copy_select); - track_copy_options = memnew(HBoxContainer); - track_vbox->add_child(track_copy_options); - select_all_button = memnew(Button); - select_all_button->set_text(TTR("Select All")); - select_all_button->connect("pressed", this, "_select_all_tracks_for_copy"); - track_copy_options->add_child(select_all_button); track_copy_dialog->connect("confirmed", this, "_edit_menu_pressed", varray(EDIT_COPY_TRACKS_CONFIRM)); animation_changing_awaiting_update = false; } diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 830d5b52d3..fd28d8f4d1 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -465,11 +465,8 @@ class AnimationTrackEditor : public VBoxContainer { void _selection_changed(); - bool selected_all_tracks; ConfirmationDialog *track_copy_dialog; Tree *track_copy_select; - HBoxContainer *track_copy_options; - Button *select_all_button; struct TrackClipboard { NodePath full_path; diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 1e5eabc24e..f5a01dfb04 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -417,6 +417,7 @@ ConnectDialog::ConnectDialog() { dst_method = memnew(LineEdit); dst_method->set_h_size_flags(SIZE_EXPAND_FILL); + dst_method->connect("text_entered", this, "_builtin_text_entered"); dstm_hb->add_child(dst_method); advanced = memnew(CheckButton); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 5f8660e108..1f58eda396 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -646,7 +646,7 @@ DependencyErrorDialog::DependencyErrorDialog() { vb->add_margin_child(TTR("Load failed due to missing dependencies:"), files, true); files->set_v_size_flags(SIZE_EXPAND_FILL); - set_custom_minimum_size(Size2(500, 220)); + set_custom_minimum_size(Size2(500, 220) * EDSCALE); get_ok()->set_text(TTR("Open Anyway")); get_cancel()->set_text(TTR("Close")); diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp index b6d27d84e0..97c796c707 100644 --- a/editor/editor_fonts.cpp +++ b/editor/editor_fonts.cpp @@ -64,7 +64,7 @@ Ref<DynamicFont> m_name; \ m_name.instance(); \ m_name->set_size(m_size); \ - if (CustomFont.is_valid()) { \ + if (CustomFontBold.is_valid()) { \ m_name->set_font_data(CustomFontBold); \ m_name->add_fallback(DefaultFontBold); \ } else { \ diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 4a1e93eaad..e4f64597b1 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1467,6 +1467,10 @@ void EditorHelp::_notification(int p_what) { _update_doc(); } break; + case NOTIFICATION_THEME_CHANGED: { + + _class_desc_resized(); + } break; default: break; } } diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 460f75eef0..fbb66744a7 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2399,19 +2399,11 @@ void EditorPropertyResource::_update_menu_items() { inheritors_array.push_back(t); - int id = TYPE_BASE_ID + idx; - - if (!icon.is_valid() && has_icon(t, "EditorIcons")) { - icon = get_icon(t, "EditorIcons"); - } - - if (icon.is_valid()) { + if (!icon.is_valid()) + icon = get_icon(has_icon(t, "EditorIcons") ? t : "Object", "EditorIcons"); - menu->add_icon_item(icon, vformat(TTR("New %s"), t), id); - } else { - - menu->add_item(vformat(TTR("New %s"), t), id); - } + int id = TYPE_BASE_ID + idx; + menu->add_icon_item(icon, vformat(TTR("New %s"), t), id); idx++; } @@ -2615,14 +2607,6 @@ void EditorPropertyResource::update_property() { get_tree()->call_deferred("call_group", "_editor_resource_properties", "_fold_other_editors", this); } opened_editor = true; - /* - Button *open_in_editor = memnew(Button); - open_in_editor->set_text(TTR("Open Editor")); - open_in_editor->set_icon(get_icon("Edit", "EditorIcons")); - sub_inspector_vbox->add_child(open_in_editor); - open_in_editor->connect("pressed", this, "_open_editor_pressed"); - open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER); - */ } } @@ -2652,7 +2636,7 @@ void EditorPropertyResource::update_property() { assign->set_tooltip(""); } else { - assign->set_icon(EditorNode::get_singleton()->get_object_icon(res.operator->(), "Node")); + assign->set_icon(EditorNode::get_singleton()->get_object_icon(res.operator->(), "Object")); if (res->get_name() != String()) { assign->set_text(res->get_name()); @@ -2925,7 +2909,7 @@ void EditorInspectorDefaultPlugin::parse_begin(Object *p_object) { bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage) { - float default_float_step = EDITOR_GET("interface/inspector/default_float_step"); + double default_float_step = EDITOR_GET("interface/inspector/default_float_step"); switch (p_type) { diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 3ea59115b0..672844117d 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -559,8 +559,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01"); _initial_set("editors/3d/freelook/freelook_activation_modifier", 0); hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl"); - _initial_set("editors/3d/freelook/freelook_modifier_speed_factor", 3.0); - hints["editors/3d/freelook/freelook_modifier_speed_factor"] = PropertyInfo(Variant::REAL, "editors/3d/freelook/freelook_modifier_speed_factor", PROPERTY_HINT_RANGE, "0.0, 10.0, 0.1"); _initial_set("editors/3d/freelook/freelook_speed_zoom_link", false); // 2D diff --git a/editor/icons/icon_crypto_key.svg b/editor/icons/icon_crypto_key.svg new file mode 100644 index 0000000000..45b53c815d --- /dev/null +++ b/editor/icons/icon_crypto_key.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 4.233 4.233" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2.397.34-.374.373-.375.374v.375l.188.187-1.497 1.496v.375l.374.374h.374l.187-.188.282-.092.092-.282.282-.093.093-.28.094-.28.28-.095.187-.187.187.187h.374l.375-.375.373-.373.001-.374-1.122-1.122zm.374.858a.264.264 0 1 1 .002.528.264.264 0 0 1 -.002-.528z" fill="#e0e0e0"/></svg>
\ No newline at end of file diff --git a/editor/icons/icon_x509_certificate.svg b/editor/icons/icon_x509_certificate.svg new file mode 100644 index 0000000000..e175fa3234 --- /dev/null +++ b/editor/icons/icon_x509_certificate.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 4.233 4.233" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.967.263-3.704.001v2.646h1.427a.993.993 0 0 1 -.022-.096.993.993 0 0 1 -.012-.099.993.993 0 0 1 -.002-.07.993.993 0 0 1 .005-.1.993.993 0 0 1 .014-.097.993.993 0 0 1 .025-.096.993.993 0 0 1 .034-.093.993.993 0 0 1 .043-.09.993.993 0 0 1 .052-.085.993.993 0 0 1 .06-.079.993.993 0 0 1 .068-.072.993.993 0 0 1 .074-.066.993.993 0 0 1 .08-.057.993.993 0 0 1 .087-.05.993.993 0 0 1 .09-.04.993.993 0 0 1 .095-.031.993.993 0 0 1 .096-.022.993.993 0 0 1 .099-.012.993.993 0 0 1 .07-.003.993.993 0 0 1 .099.006.993.993 0 0 1 .098.014.993.993 0 0 1 .096.025.993.993 0 0 1 .094.034.993.993 0 0 1 .089.043.993.993 0 0 1 .084.052.993.993 0 0 1 .08.06.993.993 0 0 1 .072.068.993.993 0 0 1 .065.074.993.993 0 0 1 .058.08.993.993 0 0 1 .05.087.993.993 0 0 1 .04.09.993.993 0 0 1 .031.095.993.993 0 0 1 .022.096.993.993 0 0 1 .012.099.993.993 0 0 1 .002.07.993.993 0 0 1 -.004.1.993.993 0 0 1 -.015.097.993.993 0 0 1 -.017.068h.365z" fill="#e0e0e0"/><g fill="#ff8484"><path d="m2.116 3.175v.793l.53-.253.529.253v-.793z"/><circle cx="2.646" cy="2.645" r=".794"/></g></svg>
\ No newline at end of file diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 49091dc812..fcf0e4af6f 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -1973,7 +1973,7 @@ Error EditorSceneImporterGLTF::_reparent_to_fake_joint(GLTFState &state, GLTFSke state.nodes.push_back(fake_joint); // We better not be a joint, or we messed up in our logic - if (node->joint == true) + if (node->joint) return FAILED; fake_joint->translation = node->translation; diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp index d6df3bd369..7ba1796600 100644 --- a/editor/node_dock.cpp +++ b/editor/node_dock.cpp @@ -129,6 +129,7 @@ NodeDock::NodeDock() { select_a_node = memnew(Label); select_a_node->set_text(TTR("Select a single node to edit its signals and groups.")); + select_a_node->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); select_a_node->set_v_size_flags(SIZE_EXPAND_FILL); select_a_node->set_valign(Label::VALIGN_CENTER); select_a_node->set_align(Label::ALIGN_CENTER); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 117b88bc7e..2a31d53a7e 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1197,7 +1197,7 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo //Pan the viewport panning = true; } - } else if (panning) { + } else { if (!k->is_pressed()) { // Stop panning the viewport (for any mouse button press) panning = false; @@ -4894,7 +4894,7 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) { if (state.has("grid_snap_active")) { grid_snap_active = state["grid_snap_active"]; - grid_snap_button->set_pressed(smart_snap_active); + grid_snap_button->set_pressed(grid_snap_active); } if (state.has("snap_node_parent")) { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 095350d0e1..1d8fd38858 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2049,12 +2049,11 @@ void SpatialEditorViewport::_update_freelook(real_t delta) { return; } - Vector3 forward = camera->get_transform().basis.xform(Vector3(0, 0, -1)); - Vector3 right = camera->get_transform().basis.xform(Vector3(1, 0, 0)); - Vector3 up = camera->get_transform().basis.xform(Vector3(0, 1, 0)); + const Vector3 forward = camera->get_transform().basis.xform(Vector3(0, 0, -1)); + const Vector3 right = camera->get_transform().basis.xform(Vector3(1, 0, 0)); + const Vector3 up = camera->get_transform().basis.xform(Vector3(0, 1, 0)); Vector3 direction; - bool speed_modifier = false; if (is_shortcut_pressed("spatial_editor/freelook_left")) { direction -= right; @@ -2074,17 +2073,17 @@ void SpatialEditorViewport::_update_freelook(real_t delta) { if (is_shortcut_pressed("spatial_editor/freelook_down")) { direction -= up; } - if (is_shortcut_pressed("spatial_editor/freelook_speed_modifier")) { - speed_modifier = true; - } real_t speed = freelook_speed; - if (speed_modifier) { - real_t modifier_speed_factor = EditorSettings::get_singleton()->get("editors/3d/freelook/freelook_modifier_speed_factor"); - speed *= modifier_speed_factor; + + if (is_shortcut_pressed("spatial_editor/freelook_speed_modifier")) { + speed *= 3.0; + } + if (is_shortcut_pressed("spatial_editor/freelook_slow_modifier")) { + speed *= 0.333333; } - Vector3 motion = direction * speed * delta; + const Vector3 motion = direction * speed * delta; cursor.pos += motion; cursor.eye_pos += motion; } @@ -3588,6 +3587,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), KEY_E); ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), KEY_Q); ED_SHORTCUT("spatial_editor/freelook_speed_modifier", TTR("Freelook Speed Modifier"), KEY_SHIFT); + ED_SHORTCUT("spatial_editor/freelook_slow_modifier", TTR("Freelook Slow Modifier"), KEY_ALT); preview_camera = memnew(CheckBox); preview_camera->set_text(TTR("Preview")); diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 7456396460..adcbddfb04 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -286,11 +286,13 @@ void ProjectExportDialog::_edit_preset(int p_index) { export_templates_error->hide(); export_button->set_disabled(true); + get_ok()->set_disabled(true); } else { export_error->hide(); export_templates_error->hide(); export_button->set_disabled(false); + get_ok()->set_disabled(false); } custom_features->set_text(current->get_custom_features()); @@ -623,6 +625,7 @@ void ProjectExportDialog::_delete_preset_confirm() { int idx = presets->get_current(); _edit_preset(-1); export_button->set_disabled(true); + get_ok()->set_disabled(true); EditorExport::get_singleton()->remove_export_preset(idx); _update_presets(); } @@ -1249,6 +1252,7 @@ ProjectExportDialog::ProjectExportDialog() { export_button->connect("pressed", this, "_export_project"); // Disable initially before we select a valid preset export_button->set_disabled(true); + get_ok()->set_disabled(true); export_all_dialog = memnew(ConfirmationDialog); add_child(export_all_dialog); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 35187214a6..803c806028 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1109,6 +1109,8 @@ void ProjectSettingsEditor::drop_data_fw(const Point2 &p_point, const Variant &p TreeItem *selected = input_editor->get_selected(); TreeItem *item = input_editor->get_item_at_position(p_point); + if (!item) + return; TreeItem *target = item->get_parent() == input_editor->get_root() ? item : item->get_parent(); String selected_name = "input/" + selected->get_text(0); |