Remove duplicate editor settings definitions
This commit is contained in:
parent
92615be68c
commit
2057ea2883
20 changed files with 48 additions and 51 deletions
|
|
@ -3588,7 +3588,7 @@ void AnimationTrackEditor::commit_insert_queue() {
|
|||
}
|
||||
}
|
||||
|
||||
if (bool(EDITOR_DEF("editors/animation/confirm_insert_track", true)) && num_tracks > 0) {
|
||||
if (bool(EDITOR_GET("editors/animation/confirm_insert_track")) && num_tracks > 0) {
|
||||
// Potentially a new key, does not exist.
|
||||
if (num_tracks == 1) {
|
||||
// TRANSLATORS: %s will be replaced by a phrase describing the target of track.
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ EditorProfiler::EditorProfiler() {
|
|||
h_split->add_child(graph);
|
||||
graph->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
int metric_size = CLAMP(int(EDITOR_DEF("debugger/profiler_frame_history_size", 600)), 60, 1024);
|
||||
int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024);
|
||||
frame_metrics.resize(metric_size);
|
||||
total_metrics = 0;
|
||||
last_metric = -1;
|
||||
|
|
|
|||
|
|
@ -789,7 +789,7 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
|||
h_split->add_child(graph);
|
||||
graph->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
int metric_size = CLAMP(int(EDITOR_DEF("debugger/profiler_frame_history_size", 600)), 60, 1024);
|
||||
int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024);
|
||||
frame_metrics.resize(metric_size);
|
||||
last_metric = -1;
|
||||
//cursor_metric=-1;
|
||||
|
|
|
|||
|
|
@ -6030,18 +6030,10 @@ EditorNode::EditorNode() {
|
|||
|
||||
// defs here, use EDITOR_GET in logic
|
||||
EDITOR_DEF_RST("interface/scene_tabs/always_show_close_button", false);
|
||||
EDITOR_DEF_RST("interface/scene_tabs/resize_if_many_tabs", true);
|
||||
EDITOR_DEF_RST("interface/scene_tabs/minimum_width", 50);
|
||||
EDITOR_DEF("run/output/always_clear_output_on_play", true);
|
||||
EDITOR_DEF("run/output/always_open_output_on_play", true);
|
||||
EDITOR_DEF("run/output/always_close_output_on_stop", true);
|
||||
EDITOR_DEF("run/auto_save/save_before_running", true);
|
||||
EDITOR_DEF("interface/editor/save_on_focus_loss", false);
|
||||
EDITOR_DEF_RST("interface/editor/save_each_scene_on_quit", true);
|
||||
EDITOR_DEF("interface/editor/show_update_spinner", false);
|
||||
EDITOR_DEF("interface/editor/update_continuously", false);
|
||||
EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", true);
|
||||
EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true);
|
||||
EDITOR_DEF_RST("interface/inspector/capitalize_properties", true);
|
||||
EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001);
|
||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::FLOAT, "interface/inspector/default_float_step", PROPERTY_HINT_RANGE, "0,1,0"));
|
||||
|
|
@ -6055,7 +6047,6 @@ EditorNode::EditorNode() {
|
|||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_mode", PROPERTY_HINT_ENUM, "RGB,HSV,RAW", PROPERTY_USAGE_DEFAULT));
|
||||
EDITOR_DEF("interface/inspector/default_color_picker_shape", (int32_t)ColorPicker::SHAPE_VHS_CIRCLE);
|
||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_shape", PROPERTY_HINT_ENUM, "HSV Rectangle,HSV Rectangle Wheel,VHS Circle", PROPERTY_USAGE_DEFAULT));
|
||||
EDITOR_DEF("run/auto_save/save_before_running", true);
|
||||
|
||||
ED_SHORTCUT("canvas_item_editor/pan_view", TTR("Pan View"), Key::SPACE);
|
||||
|
||||
|
|
@ -6263,8 +6254,8 @@ EditorNode::EditorNode() {
|
|||
scene_tabs->set_select_with_rmb(true);
|
||||
scene_tabs->add_tab("unsaved");
|
||||
scene_tabs->set_tab_alignment(TabBar::ALIGNMENT_LEFT);
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/scene_tabs/always_show_close_button", false)) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
scene_tabs->set_min_width(int(EDITOR_DEF("interface/scene_tabs/minimum_width", 50)) * EDSCALE);
|
||||
scene_tabs->set_tab_close_display_policy((bool(EDITOR_GET("interface/scene_tabs/always_show_close_button")) ? TabBar::CLOSE_BUTTON_SHOW_ALWAYS : TabBar::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
|
||||
scene_tabs->set_min_width(int(EDITOR_GET("interface/scene_tabs/minimum_width")) * EDSCALE);
|
||||
scene_tabs->set_drag_to_rearrange_enabled(true);
|
||||
scene_tabs->connect("tab_changed", callable_mp(this, &EditorNode::_scene_tab_changed));
|
||||
scene_tabs->connect("tab_button_pressed", callable_mp(this, &EditorNode::_scene_tab_script_edited));
|
||||
|
|
|
|||
|
|
@ -554,6 +554,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
_initial_set("text_editor/behavior/files/autosave_interval_secs", 0);
|
||||
_initial_set("text_editor/behavior/files/restore_scripts_on_load", true);
|
||||
_initial_set("text_editor/behavior/files/convert_indent_on_save", true);
|
||||
_initial_set("text_editor/behavior/files/auto_reload_scripts_on_external_change", false);
|
||||
|
||||
// Script list
|
||||
_initial_set("text_editor/script_list/show_members_overview", true);
|
||||
|
|
@ -586,6 +587,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
|
||||
// Use a similar color to the 2D editor selection.
|
||||
EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/selection_box_color", Color(1.0, 0.5, 0), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
|
||||
_initial_set("editors/3d_gizmos/gizmo_colors/instantiated", Color(0.7, 0.7, 0.7, 0.6));
|
||||
_initial_set("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1));
|
||||
_initial_set("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
|
||||
// If a line is a multiple of this, it uses the primary grid color.
|
||||
// Use a power of 2 value by default as it's more common to use powers of 2 in level design.
|
||||
|
|
@ -709,6 +713,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
// SSL
|
||||
EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem")
|
||||
|
||||
// Profiler
|
||||
_initial_set("debugger/profiler_frame_history_size", 600);
|
||||
|
||||
/* Extra config */
|
||||
|
||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited")
|
||||
|
|
|
|||
|
|
@ -1172,7 +1172,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
|||
theme->set_icon("can_fold", "CodeEdit", theme->get_icon(SNAME("GuiTreeArrowDown"), SNAME("EditorIcons")));
|
||||
theme->set_icon("executing_line", "CodeEdit", theme->get_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
|
||||
theme->set_icon("breakpoint", "CodeEdit", theme->get_icon(SNAME("Breakpoint"), SNAME("EditorIcons")));
|
||||
theme->set_constant("line_spacing", "CodeEdit", EDITOR_DEF("text_editor/appearance/whitespace/line_spacing", 6));
|
||||
theme->set_constant("line_spacing", "CodeEdit", EDITOR_GET("text_editor/appearance/whitespace/line_spacing"));
|
||||
|
||||
// H/VSplitContainer
|
||||
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon(SNAME("GuiVsplitBg"), SNAME("EditorIcons")), 1, 1, 1, 1));
|
||||
|
|
|
|||
|
|
@ -298,8 +298,8 @@ void EditorFileServer::_thread_start(void *s) {
|
|||
|
||||
void EditorFileServer::start() {
|
||||
stop();
|
||||
port = EDITOR_DEF("filesystem/file_server/port", 6010);
|
||||
password = EDITOR_DEF("filesystem/file_server/password", "");
|
||||
port = EDITOR_GET("filesystem/file_server/port");
|
||||
password = EDITOR_GET("filesystem/file_server/password");
|
||||
cmd = CMD_ACTIVATE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
static inline void setup_http_request(HTTPRequest *request) {
|
||||
request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
|
||||
|
||||
const String proxy_host = EDITOR_DEF("network/http_proxy/host", "");
|
||||
const int proxy_port = EDITOR_DEF("network/http_proxy/port", -1);
|
||||
const String proxy_host = EDITOR_GET("network/http_proxy/host");
|
||||
const int proxy_port = EDITOR_GET("network/http_proxy/port");
|
||||
request->set_http_proxy(proxy_host, proxy_port);
|
||||
request->set_https_proxy(proxy_host, proxy_port);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,7 +317,6 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible) {
|
|||
}
|
||||
|
||||
MeshLibraryEditorPlugin::MeshLibraryEditorPlugin() {
|
||||
EDITOR_DEF("editors/grid_map/preview_size", 64);
|
||||
mesh_library_editor = memnew(MeshLibraryEditor);
|
||||
|
||||
EditorNode::get_singleton()->get_main_control()->add_child(mesh_library_editor);
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ EditorNode3DGizmo::~EditorNode3DGizmo() {
|
|||
/////
|
||||
|
||||
void EditorNode3DGizmoPlugin::create_material(const String &p_name, const Color &p_color, bool p_billboard, bool p_on_top, bool p_use_vertex_color) {
|
||||
Color instantiated_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instantiated", Color(0.7, 0.7, 0.7, 0.6));
|
||||
Color instantiated_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instantiated");
|
||||
|
||||
Vector<Ref<StandardMaterial3D>> mats;
|
||||
|
||||
|
|
@ -918,7 +918,7 @@ void EditorNode3DGizmoPlugin::create_material(const String &p_name, const Color
|
|||
}
|
||||
|
||||
void EditorNode3DGizmoPlugin::create_icon_material(const String &p_name, const Ref<Texture2D> &p_texture, bool p_on_top, const Color &p_albedo) {
|
||||
Color instantiated_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instantiated", Color(0.7, 0.7, 0.7, 0.6));
|
||||
Color instantiated_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instantiated");
|
||||
|
||||
Vector<Ref<StandardMaterial3D>> icons;
|
||||
|
||||
|
|
@ -2251,7 +2251,7 @@ void Position3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
////
|
||||
|
||||
PhysicalBone3DGizmoPlugin::PhysicalBone3DGizmoPlugin() {
|
||||
create_material("joint_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)));
|
||||
create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
|
||||
}
|
||||
|
||||
bool PhysicalBone3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
|
||||
|
|
@ -2384,7 +2384,7 @@ void PhysicalBone3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
/////
|
||||
|
||||
RayCast3DGizmoPlugin::RayCast3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
|
@ -2438,7 +2438,7 @@ void SpringArm3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
}
|
||||
|
||||
SpringArm3DGizmoPlugin::SpringArm3DGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
}
|
||||
|
||||
|
|
@ -2457,7 +2457,7 @@ int SpringArm3DGizmoPlugin::get_priority() const {
|
|||
/////
|
||||
|
||||
VehicleWheel3DGizmoPlugin::VehicleWheel3DGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
}
|
||||
|
||||
|
|
@ -2528,7 +2528,7 @@ void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
///////////
|
||||
|
||||
SoftDynamicBody3DGizmoPlugin::SoftDynamicBody3DGizmoPlugin() {
|
||||
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
create_handle_material("handles");
|
||||
}
|
||||
|
|
@ -3976,7 +3976,7 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
////
|
||||
|
||||
CollisionObject3DGizmoPlugin::CollisionObject3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
|
@ -4026,7 +4026,7 @@ void CollisionObject3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
////
|
||||
|
||||
CollisionShape3DGizmoPlugin::CollisionShape3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
|
@ -4627,7 +4627,7 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
|||
/////
|
||||
|
||||
CollisionPolygon3DGizmoPlugin::CollisionPolygon3DGizmoPlugin() {
|
||||
const Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
|
||||
const Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
|
||||
create_material("shape_material", gizmo_color);
|
||||
const float gizmo_value = gizmo_color.get_v();
|
||||
const Color gizmo_color_disabled = Color(gizmo_value, gizmo_value, gizmo_value, 0.65);
|
||||
|
|
@ -5024,7 +5024,7 @@ void JointGizmosDrawer::draw_cone(const Transform3D &p_offset, const Basis &p_ba
|
|||
////
|
||||
|
||||
Joint3DGizmoPlugin::Joint3DGizmoPlugin() {
|
||||
create_material("joint_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1)));
|
||||
create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
|
||||
create_material("joint_body_a_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint_body_a", Color(0.6, 0.8, 1)));
|
||||
create_material("joint_body_b_material", EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint_body_b", Color(0.6, 0.9, 1)));
|
||||
|
||||
|
|
|
|||
|
|
@ -2286,7 +2286,7 @@ void Node3DEditorViewport::scale_freelook_speed(real_t scale) {
|
|||
|
||||
Point2i Node3DEditorViewport::_get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const {
|
||||
Point2i relative;
|
||||
if (bool(EDITOR_DEF("editors/3d/navigation/warped_mouse_panning", false))) {
|
||||
if (bool(EDITOR_GET("editors/3d/navigation/warped_mouse_panning"))) {
|
||||
relative = Input::get_singleton()->warp_mouse_motion(p_ev_mouse_motion, surface->get_global_rect());
|
||||
} else {
|
||||
relative = p_ev_mouse_motion->get_relative();
|
||||
|
|
|
|||
|
|
@ -1062,7 +1062,7 @@ void Polygon2DEditor::_uv_draw() {
|
|||
for (int i = 0; i < uvs.size(); i++) {
|
||||
int next = uv_draw_max > 0 ? (i + 1) % uv_draw_max : 0;
|
||||
|
||||
if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_DEF("editors/polygon_editor/show_previous_outline", true)) {
|
||||
if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_GET("editors/polygon_editor/show_previous_outline")) {
|
||||
uv_edit_draw->draw_line(mtx.xform(points_prev[i]), mtx.xform(points_prev[next]), prev_color, Math::round(EDSCALE));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1046,7 +1046,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
|
|||
|
||||
bool need_ask = false;
|
||||
bool need_reload = false;
|
||||
bool use_autoreload = bool(EDITOR_DEF("text_editor/behavior/files/auto_reload_scripts_on_external_change", false));
|
||||
bool use_autoreload = bool(EDITOR_GET("text_editor/behavior/files/auto_reload_scripts_on_external_change"));
|
||||
|
||||
for (int i = 0; i < tab_container->get_tab_count(); i++) {
|
||||
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
|
||||
|
|
@ -2723,7 +2723,7 @@ void ScriptEditor::_editor_settings_changed() {
|
|||
_update_script_colors();
|
||||
_update_script_names();
|
||||
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save", true));
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_GET("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save"));
|
||||
}
|
||||
|
||||
void ScriptEditor::_filesystem_changed() {
|
||||
|
|
@ -3125,7 +3125,7 @@ void ScriptEditor::_make_script_list_context_menu() {
|
|||
}
|
||||
|
||||
void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
|
||||
if (!bool(EDITOR_DEF("text_editor/behavior/files/restore_scripts_on_load", true))) {
|
||||
if (!bool(EDITOR_GET("text_editor/behavior/files/restore_scripts_on_load"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -4039,7 +4039,7 @@ ScriptEditorPlugin::ScriptEditorPlugin() {
|
|||
|
||||
script_editor->hide();
|
||||
|
||||
EDITOR_DEF("text_editor/behavior/files/auto_reload_scripts_on_external_change", true);
|
||||
EDITOR_GET("text_editor/behavior/files/auto_reload_scripts_on_external_change");
|
||||
ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save", true));
|
||||
EDITOR_DEF("text_editor/behavior/files/open_dominant_script_on_scene_change", true);
|
||||
EDITOR_DEF("text_editor/external/use_external_editor", false);
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ void ScriptTextEditor::_update_errors() {
|
|||
errors_panel->pop(); // Table
|
||||
|
||||
CodeEdit *te = code_editor->get_text_editor();
|
||||
bool highlight_safe = EDITOR_DEF("text_editor/appearance/gutters/highlight_type_safe_lines", true);
|
||||
bool highlight_safe = EDITOR_GET("text_editor/appearance/gutters/highlight_type_safe_lines");
|
||||
bool last_is_safe = false;
|
||||
for (int i = 0; i < te->get_line_count(); i++) {
|
||||
if (errors.is_empty()) {
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ void ShaderEditor::_check_for_external_edit() {
|
|||
return;
|
||||
}
|
||||
|
||||
bool use_autoreload = bool(EDITOR_DEF("text_editor/behavior/files/auto_reload_scripts_on_external_change", false));
|
||||
bool use_autoreload = bool(EDITOR_GET("text_editor/behavior/files/auto_reload_scripts_on_external_change"));
|
||||
if (shader->get_last_modified_time() != FileAccess::get_modified_time(shader->get_path())) {
|
||||
if (use_autoreload) {
|
||||
_reload_shader_from_disk();
|
||||
|
|
|
|||
|
|
@ -1535,7 +1535,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, Map<Node *, NodePath> *p_
|
|||
}
|
||||
}
|
||||
|
||||
bool autorename_animation_tracks = bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true));
|
||||
bool autorename_animation_tracks = bool(EDITOR_GET("editors/animation/autorename_animation_tracks"));
|
||||
|
||||
if (autorename_animation_tracks && Object::cast_to<AnimationPlayer>(p_base)) {
|
||||
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_base);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Ref<Script> GDScriptLanguage::make_template(const String &p_template, const Stri
|
|||
script.instantiate();
|
||||
String processed_template = p_template;
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (!EDITOR_DEF("text_editor/completion/add_type_hints", false)) {
|
||||
if (!EDITOR_GET("text_editor/completion/add_type_hints")) {
|
||||
processed_template = processed_template.replace(": int", "")
|
||||
.replace(": String", "")
|
||||
.replace(": float", "")
|
||||
|
|
@ -2771,10 +2771,10 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
|
|||
String GDScriptLanguage::_get_indentation() const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
bool use_space_indentation = EDITOR_DEF("text_editor/behavior/indent/type", false);
|
||||
bool use_space_indentation = EDITOR_GET("text_editor/behavior/indent/type");
|
||||
|
||||
if (use_space_indentation) {
|
||||
int indent_size = EDITOR_DEF("text_editor/behavior/indent/size", 4);
|
||||
int indent_size = EDITOR_GET("text_editor/behavior/indent/size");
|
||||
|
||||
String space_indent = "";
|
||||
for (int i = 0; i < indent_size; i++) {
|
||||
|
|
|
|||
|
|
@ -823,7 +823,7 @@ void GridMapEditor::_icon_size_changed(float p_value) {
|
|||
void GridMapEditor::update_palette() {
|
||||
int selected = mesh_library_palette->get_current();
|
||||
|
||||
float min_size = EDITOR_DEF("editors/grid_map/preview_size", 64);
|
||||
float min_size = EDITOR_GET("editors/grid_map/preview_size");
|
||||
min_size *= EDSCALE;
|
||||
|
||||
mesh_library_palette->clear();
|
||||
|
|
@ -1207,7 +1207,7 @@ GridMapEditor::GridMapEditor() {
|
|||
settings_pick_distance->set_max(10000.0f);
|
||||
settings_pick_distance->set_min(500.0f);
|
||||
settings_pick_distance->set_step(1.0f);
|
||||
settings_pick_distance->set_value(EDITOR_DEF("editors/grid_map/pick_distance", 5000.0));
|
||||
settings_pick_distance->set_value(EDITOR_GET("editors/grid_map/pick_distance"));
|
||||
settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
|
||||
|
||||
options->get_popup()->connect("id_pressed", callable_mp(this, &GridMapEditor::_menu_option));
|
||||
|
|
|
|||
|
|
@ -527,10 +527,10 @@ String CSharpLanguage::make_function(const String &, const String &, const Packe
|
|||
String CSharpLanguage::_get_indentation() const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
bool use_space_indentation = EDITOR_DEF("text_editor/behavior/indent/type", 0);
|
||||
bool use_space_indentation = EDITOR_GET("text_editor/behavior/indent/type");
|
||||
|
||||
if (use_space_indentation) {
|
||||
int indent_size = EDITOR_DEF("text_editor/behavior/indent/size", 4);
|
||||
int indent_size = EDITOR_GET("text_editor/behavior/indent/size");
|
||||
|
||||
String space_indent = "";
|
||||
for (int i = 0; i < indent_size; i++) {
|
||||
|
|
|
|||
|
|
@ -647,8 +647,8 @@ void LineEdit::_notification(int p_what) {
|
|||
#ifdef TOOLS_ENABLED
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
if (Engine::get_singleton()->is_editor_hint() && !get_tree()->is_node_being_edited(this)) {
|
||||
set_caret_blink_enabled(EDITOR_DEF("text_editor/appearance/caret/caret_blink", false));
|
||||
set_caret_blink_speed(EDITOR_DEF("text_editor/appearance/caret/caret_blink_speed", 0.65));
|
||||
set_caret_blink_enabled(EDITOR_GET("text_editor/appearance/caret/caret_blink"));
|
||||
set_caret_blink_speed(EDITOR_GET("text_editor/appearance/caret/caret_blink_speed"));
|
||||
|
||||
if (!EditorSettings::get_singleton()->is_connected("settings_changed", callable_mp(this, &LineEdit::_editor_settings_changed))) {
|
||||
EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &LineEdit::_editor_settings_changed));
|
||||
|
|
@ -1944,8 +1944,8 @@ PopupMenu *LineEdit::get_menu() const {
|
|||
|
||||
void LineEdit::_editor_settings_changed() {
|
||||
#ifdef TOOLS_ENABLED
|
||||
set_caret_blink_enabled(EDITOR_DEF("text_editor/appearance/caret/caret_blink", false));
|
||||
set_caret_blink_speed(EDITOR_DEF("text_editor/appearance/caret/caret_blink_speed", 0.65));
|
||||
set_caret_blink_enabled(EDITOR_GET("text_editor/appearance/caret/caret_blink"));
|
||||
set_caret_blink_speed(EDITOR_GET("text_editor/appearance/caret/caret_blink_speed"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue