|
@@ -636,9 +636,17 @@ void EditorNode::_update_update_spinner() {
|
|
|
update_spinner->set_visible(EditorSettings::get_singleton()->get("interface/editor/show_update_spinner"));
|
|
|
|
|
|
const bool update_continuously = EditorSettings::get_singleton()->get("interface/editor/update_continuously");
|
|
|
+ const bool vital_only = EditorSettings::get_singleton()->get("interface/editor/update_vital_only");
|
|
|
PopupMenu *update_popup = update_spinner->get_popup();
|
|
|
update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_CONTINUOUSLY), update_continuously);
|
|
|
- update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_WHEN_CHANGED), !update_continuously);
|
|
|
+
|
|
|
+ if (update_continuously) {
|
|
|
+ update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_WHEN_CHANGED), false);
|
|
|
+ update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_VITAL_ONLY), false);
|
|
|
+ } else {
|
|
|
+ update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_WHEN_CHANGED), !vital_only);
|
|
|
+ update_popup->set_item_checked(update_popup->get_item_index(SETTINGS_UPDATE_VITAL_ONLY), vital_only);
|
|
|
+ }
|
|
|
|
|
|
if (update_continuously) {
|
|
|
update_spinner->set_tooltip(TTR("Spins when the editor window redraws.\nUpdate Continuously is enabled, which can increase power usage. Click to disable it."));
|
|
@@ -656,6 +664,11 @@ void EditorNode::_update_update_spinner() {
|
|
|
}
|
|
|
|
|
|
OS::get_singleton()->set_low_processor_usage_mode(!update_continuously);
|
|
|
+
|
|
|
+ // Only set low priority redraws to false in the editor.
|
|
|
+ // When we run the project in the editor, we don't want it to prevent
|
|
|
+ // rendering any frames.
|
|
|
+ OS::get_singleton()->set_update_vital_only(vital_only && !update_continuously);
|
|
|
}
|
|
|
|
|
|
void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_name) {
|
|
@@ -2791,6 +2804,12 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|
|
} break;
|
|
|
case SETTINGS_UPDATE_WHEN_CHANGED: {
|
|
|
EditorSettings::get_singleton()->set("interface/editor/update_continuously", false);
|
|
|
+ EditorSettings::get_singleton()->set("interface/editor/update_vital_only", false);
|
|
|
+ _update_update_spinner();
|
|
|
+ } break;
|
|
|
+ case SETTINGS_UPDATE_VITAL_ONLY: {
|
|
|
+ EditorSettings::get_singleton()->set("interface/editor/update_continuously", false);
|
|
|
+ EditorSettings::get_singleton()->set("interface/editor/update_vital_only", true);
|
|
|
_update_update_spinner();
|
|
|
} break;
|
|
|
case SETTINGS_UPDATE_SPINNER_HIDE: {
|
|
@@ -5951,6 +5970,7 @@ EditorNode::EditorNode() {
|
|
|
EDITOR_DEF("interface/editor/quit_confirmation", true);
|
|
|
EDITOR_DEF("interface/editor/show_update_spinner", false);
|
|
|
EDITOR_DEF("interface/editor/update_continuously", false);
|
|
|
+ EDITOR_DEF("interface/editor/update_vital_only", false);
|
|
|
EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", false);
|
|
|
EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true);
|
|
|
EDITOR_DEF_RST("interface/inspector/capitalize_properties", true);
|
|
@@ -6622,7 +6642,8 @@ EditorNode::EditorNode() {
|
|
|
update_spinner->get_popup()->connect("id_pressed", this, "_menu_option");
|
|
|
p = update_spinner->get_popup();
|
|
|
p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY);
|
|
|
- p->add_radio_check_item(TTR("Update When Changed"), SETTINGS_UPDATE_WHEN_CHANGED);
|
|
|
+ p->add_radio_check_item(TTR("Update All Changes"), SETTINGS_UPDATE_WHEN_CHANGED);
|
|
|
+ p->add_radio_check_item(TTR("Update Vital Changes"), SETTINGS_UPDATE_VITAL_ONLY);
|
|
|
p->add_separator();
|
|
|
p->add_item(TTR("Hide Update Spinner"), SETTINGS_UPDATE_SPINNER_HIDE);
|
|
|
_update_update_spinner();
|