diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/connections_dialog.cpp | 8 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 14 | ||||
-rw-r--r-- | tools/editor/editor_node.h | 1 | ||||
-rw-r--r-- | tools/editor/multi_node_edit.cpp | 9 | ||||
-rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 7 | ||||
-rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.h | 1 | ||||
-rw-r--r-- | tools/editor/project_manager.cpp | 3 |
7 files changed, 38 insertions, 5 deletions
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index c4f2435675..1baad2c6b3 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -181,6 +181,14 @@ void ConnectDialog::ok_pressed() { error->popup_centered_minsize(); return; } + Node* target = tree->get_selected(); + if (target->get_script().is_null()) { + if (!target->has_method(dst_method->get_text())) { + error->set_text(TTR("Target method not found! Specify a valid method or attach a script to target Node.")); + error->popup_centered_minsize(); + return; + } + } emit_signal("connected"); hide(); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 8274272a7e..c17cf05ea7 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -266,10 +266,12 @@ void EditorNode::_notification(int p_what) { circle_step=0; circle_step_msec=tick; - circle_step_frame=frame+1; - - update_menu->set_icon(gui_base->get_icon("Progress"+itos(circle_step+1),"EditorIcons")); + circle_step_frame=frame+1; + // update the circle itself only when its enabled + if (!update_menu->get_popup()->is_item_checked(3)){ + update_menu->set_icon(gui_base->get_icon("Progress"+itos(circle_step+1),"EditorIcons")); + } } scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height"))); @@ -2797,6 +2799,10 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { update_menu->get_popup()->set_item_checked(1,true); OS::get_singleton()->set_low_processor_usage_mode(true); } break; + case SETTINGS_UPDATE_SPINNER_HIDE: { + update_menu->set_icon(gui_base->get_icon("Collapse","EditorIcons")); + update_menu->get_popup()->toggle_item_checked(3); + } break; case SETTINGS_PREFERENCES: { settings_config_dialog->popup_edit_settings(); @@ -6064,6 +6070,8 @@ EditorNode::EditorNode() { p=update_menu->get_popup(); p->add_check_item(TTR("Update Always"),SETTINGS_UPDATE_ALWAYS); p->add_check_item(TTR("Update Changes"),SETTINGS_UPDATE_CHANGES); + p->add_separator(); + p->add_check_item(TTR("Disable Update Spinner"),SETTINGS_UPDATE_SPINNER_HIDE); p->set_item_checked(1,true); //sources_button->connect(); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 0393cd19a9..6392b96f8f 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -179,6 +179,7 @@ private: RUN_RELOAD_SCRIPTS, SETTINGS_UPDATE_ALWAYS, SETTINGS_UPDATE_CHANGES, + SETTINGS_UPDATE_SPINNER_HIDE, SETTINGS_EXPORT_PREFERENCES, SETTINGS_PREFERENCES, SETTINGS_OPTIMIZED_PRESETS, diff --git a/tools/editor/multi_node_edit.cpp b/tools/editor/multi_node_edit.cpp index 4d27b8e349..e4ceaf4a8b 100644 --- a/tools/editor/multi_node_edit.cpp +++ b/tools/editor/multi_node_edit.cpp @@ -53,7 +53,14 @@ bool MultiNodeEdit::_set(const StringName& p_name, const Variant& p_value){ if (!n) continue; - ur->add_do_property(n,name,p_value); + if (p_value.get_type() == Variant::NODE_PATH) { + Node *tonode = n->get_node(p_value); + NodePath p_path = n->get_path_to(tonode); + ur->add_do_property(n,name,p_path); + } else { + ur->add_do_property(n,name,p_value); + } + ur->add_undo_property(n,name,n->get(name)); diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 9701b8030d..6dcc71422a 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -1978,6 +1978,11 @@ void SpatialEditorViewport::_menu_option(int p_option) { _update_name(); } break; + case VIEW_CENTER_TO_ORIGIN: { + + cursor.pos = Vector3(0,0,0); + + } break; case VIEW_CENTER_TO_SELECTION: { focus_selection(); @@ -2391,6 +2396,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(VIEW_GIZMOS),true); view_menu->get_popup()->add_separator(); + view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_origin"), VIEW_CENTER_TO_ORIGIN); view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION); view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_selection_with_view"), VIEW_ALIGN_SELECTION_WITH_VIEW); view_menu->get_popup()->connect("item_pressed",this,"_menu_option"); @@ -3858,6 +3864,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { ED_SHORTCUT("spatial_editor/switch_perspective_orthogonal", TTR("Switch Perspective/Orthogonal view"), KEY_KP_5); ED_SHORTCUT("spatial_editor/snap", TTR("Snap"), KEY_S); ED_SHORTCUT("spatial_editor/insert_anim_key", TTR("Insert Animation Key"), KEY_K); + ED_SHORTCUT("spatial_editor/focus_origin", TTR("Focus Origin"), KEY_O); ED_SHORTCUT("spatial_editor/focus_selection", TTR("Focus Selection"), KEY_F); ED_SHORTCUT("spatial_editor/align_selection_with_view", TTR("Align Selection With View"), KEY_MASK_ALT+KEY_MASK_CMD+KEY_F); diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h index 975092a01d..89587526ee 100644 --- a/tools/editor/plugins/spatial_editor_plugin.h +++ b/tools/editor/plugins/spatial_editor_plugin.h @@ -76,6 +76,7 @@ friend class SpatialEditor; VIEW_RIGHT, VIEW_FRONT, VIEW_REAR, + VIEW_CENTER_TO_ORIGIN, VIEW_CENTER_TO_SELECTION, VIEW_ALIGN_SELECTION_WITH_VIEW, VIEW_PERSPECTIVE, diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 18a4e845a0..1c99982155 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -142,6 +142,7 @@ private: String sp = p.simplify_path(); project_path->set_text(sp); _path_text_changed(p); + get_ok()->call_deferred("grab_focus"); } void _path_selected(const String& p_path) { @@ -150,7 +151,7 @@ private: String sp = p.simplify_path(); project_path->set_text(sp); _path_text_changed(p); - + get_ok()->call_deferred("grab_focus"); } void _browse_path() { |