Add support for documenting most editor settings in the class reference

Settings defined in editor plugins are missing (about 100 of them),
but all other settings (about 200 of them) can now be documented in the
EditorSettings class.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 63ce655e75e9d46c8b588ff258c3f50d5290c553)
This commit is contained in:
Hugo Locurcio 2021-05-07 22:21:03 +02:00 committed by Relintai
parent bcf96a5840
commit 73588d4a25
2 changed files with 445 additions and 2 deletions

View File

@ -154,6 +154,434 @@
</description>
</method>
</methods>
<members>
<member name="docks/filesystem/always_show_folders" type="bool" setter="" getter="">
</member>
<member name="docks/filesystem/thumbnail_size" type="int" setter="" getter="">
</member>
<member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter="">
</member>
<member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
</member>
<member name="docks/scene_tree/start_create_dialog_fully_expanded" type="bool" setter="" getter="">
</member>
<member name="editors/2d/bone_color1" type="Color" setter="" getter="">
</member>
<member name="editors/2d/bone_color2" type="Color" setter="" getter="">
</member>
<member name="editors/2d/bone_ik_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/bone_outline_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/bone_outline_size" type="int" setter="" getter="">
</member>
<member name="editors/2d/bone_selected_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/bone_width" type="int" setter="" getter="">
</member>
<member name="editors/2d/constrain_editor_view" type="bool" setter="" getter="">
</member>
<member name="editors/2d/grid_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/guides_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/pan_speed" type="int" setter="" getter="">
</member>
<member name="editors/2d/scroll_to_pan" type="bool" setter="" getter="">
</member>
<member name="editors/2d/simple_panning" type="bool" setter="" getter="">
</member>
<member name="editors/2d/smart_snapping_line_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/viewport_border_color" type="Color" setter="" getter="">
</member>
<member name="editors/2d/warped_mouse_panning" type="bool" setter="" getter="">
</member>
<member name="editors/3d/default_fov" type="float" setter="" getter="">
</member>
<member name="editors/3d/default_z_far" type="float" setter="" getter="">
</member>
<member name="editors/3d/default_z_near" type="float" setter="" getter="">
</member>
<member name="editors/3d/freelook/freelook_activation_modifier" type="int" setter="" getter="">
</member>
<member name="editors/3d/freelook/freelook_base_speed" type="float" setter="" getter="">
</member>
<member name="editors/3d/freelook/freelook_inertia" type="float" setter="" getter="">
</member>
<member name="editors/3d/freelook/freelook_navigation_scheme" type="int" setter="" getter="">
</member>
<member name="editors/3d/freelook/freelook_sensitivity" type="float" setter="" getter="">
</member>
<member name="editors/3d/freelook/freelook_speed_zoom_link" type="bool" setter="" getter="">
</member>
<member name="editors/3d/grid_division_level_bias" type="float" setter="" getter="">
</member>
<member name="editors/3d/grid_division_level_max" type="int" setter="" getter="">
</member>
<member name="editors/3d/grid_division_level_min" type="int" setter="" getter="">
</member>
<member name="editors/3d/grid_size" type="int" setter="" getter="">
</member>
<member name="editors/3d/grid_xy_plane" type="bool" setter="" getter="">
</member>
<member name="editors/3d/grid_xz_plane" type="bool" setter="" getter="">
</member>
<member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
</member>
<member name="editors/3d/lightmap_baking_number_of_cpu_threads" type="int" setter="" getter="">
</member>
<member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
</member>
<member name="editors/3d/navigation/emulate_numpad" type="bool" setter="" getter="">
</member>
<member name="editors/3d/navigation/invert_x_axis" type="bool" setter="" getter="">
</member>
<member name="editors/3d/navigation/invert_y_axis" type="bool" setter="" getter="">
</member>
<member name="editors/3d/navigation/navigation_scheme" type="int" setter="" getter="">
</member>
<member name="editors/3d/navigation/orbit_modifier" type="int" setter="" getter="">
</member>
<member name="editors/3d/navigation/pan_modifier" type="int" setter="" getter="">
</member>
<member name="editors/3d/navigation/warped_mouse_panning" type="bool" setter="" getter="">
</member>
<member name="editors/3d/navigation/zoom_modifier" type="int" setter="" getter="">
</member>
<member name="editors/3d/navigation/zoom_style" type="int" setter="" getter="">
</member>
<member name="editors/3d/navigation_feel/orbit_inertia" type="float" setter="" getter="">
</member>
<member name="editors/3d/navigation_feel/orbit_sensitivity" type="float" setter="" getter="">
</member>
<member name="editors/3d/navigation_feel/translation_inertia" type="float" setter="" getter="">
</member>
<member name="editors/3d/navigation_feel/zoom_inertia" type="float" setter="" getter="">
</member>
<member name="editors/3d/primary_grid_color" type="Color" setter="" getter="">
</member>
<member name="editors/3d/primary_grid_steps" type="int" setter="" getter="">
</member>
<member name="editors/3d/secondary_grid_color" type="Color" setter="" getter="">
</member>
<member name="editors/3d/selection_box_color" type="Color" setter="" getter="">
</member>
<member name="editors/3d_gizmos/gizmo_colors/instanced" type="Color" setter="" getter="">
</member>
<member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
</member>
<member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter="">
</member>
<member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter="">
</member>
<member name="editors/animation/confirm_insert_track" type="bool" setter="" getter="">
</member>
<member name="editors/animation/default_create_bezier_tracks" type="bool" setter="" getter="">
</member>
<member name="editors/animation/default_create_reset_tracks" type="bool" setter="" getter="">
</member>
<member name="editors/animation/onion_layers_future_color" type="Color" setter="" getter="">
</member>
<member name="editors/animation/onion_layers_past_color" type="Color" setter="" getter="">
</member>
<member name="editors/grid_map/pick_distance" type="float" setter="" getter="">
</member>
<member name="editors/grid_map/preview_size" type="int" setter="" getter="">
</member>
<member name="editors/poly_editor/point_grab_radius" type="int" setter="" getter="">
</member>
<member name="editors/poly_editor/show_previous_outline" type="bool" setter="" getter="">
</member>
<member name="editors/visual_editors/minimap_opacity" type="float" setter="" getter="">
</member>
<member name="filesystem/directories/autoscan_project_path" type="String" setter="" getter="">
</member>
<member name="filesystem/directories/default_project_path" type="String" setter="" getter="">
</member>
<member name="filesystem/file_dialog/display_mode" type="int" setter="" getter="">
</member>
<member name="filesystem/file_dialog/show_hidden_files" type="bool" setter="" getter="">
</member>
<member name="filesystem/file_dialog/thumbnail_size" type="int" setter="" getter="">
</member>
<member name="filesystem/on_save/compress_binary_resources" type="bool" setter="" getter="">
</member>
<member name="filesystem/on_save/safe_save_on_backup_then_rename" type="bool" setter="" getter="">
</member>
<member name="interface/editor/automatically_open_screenshots" type="bool" setter="" getter="">
</member>
<member name="interface/editor/code_font" type="String" setter="" getter="">
</member>
<member name="interface/editor/code_font_size" type="int" setter="" getter="">
</member>
<member name="interface/editor/custom_display_scale" type="float" setter="" getter="">
</member>
<member name="interface/editor/dim_editor_on_dialog_popup" type="bool" setter="" getter="">
</member>
<member name="interface/editor/display_scale" type="int" setter="" getter="">
</member>
<member name="interface/editor/editor_language" type="String" setter="" getter="">
</member>
<member name="interface/editor/font_antialiased" type="bool" setter="" getter="">
</member>
<member name="interface/editor/font_hinting" type="int" setter="" getter="">
</member>
<member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter="">
</member>
<member name="interface/editor/main_font" type="String" setter="" getter="">
</member>
<member name="interface/editor/main_font_bold" type="String" setter="" getter="">
</member>
<member name="interface/editor/main_font_size" type="int" setter="" getter="">
</member>
<member name="interface/editor/quit_confirmation" type="bool" setter="" getter="">
</member>
<member name="interface/editor/save_each_scene_on_quit" type="bool" setter="" getter="">
</member>
<member name="interface/editor/separate_distraction_mode" type="bool" setter="" getter="">
</member>
<member name="interface/editor/unfocused_low_processor_mode_sleep_usec" type="float" setter="" getter="">
</member>
<member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
</member>
<member name="interface/scene_tabs/minimum_width" type="int" setter="" getter="">
</member>
<member name="interface/scene_tabs/resize_if_many_tabs" type="bool" setter="" getter="">
</member>
<member name="interface/scene_tabs/show_script_button" type="bool" setter="" getter="">
</member>
<member name="interface/scene_tabs/show_thumbnail_on_hover" type="bool" setter="" getter="">
</member>
<member name="interface/theme/accent_color" type="Color" setter="" getter="">
</member>
<member name="interface/theme/additional_spacing" type="float" setter="" getter="">
</member>
<member name="interface/theme/base_color" type="Color" setter="" getter="">
</member>
<member name="interface/theme/border_size" type="int" setter="" getter="">
</member>
<member name="interface/theme/contrast" type="float" setter="" getter="">
</member>
<member name="interface/theme/custom_theme" type="String" setter="" getter="">
</member>
<member name="interface/theme/highlight_tabs" type="bool" setter="" getter="">
</member>
<member name="interface/theme/icon_and_font_color" type="int" setter="" getter="">
</member>
<member name="interface/theme/preset" type="String" setter="" getter="">
</member>
<member name="interface/theme/relationship_line_opacity" type="float" setter="" getter="">
</member>
<member name="interface/theme/use_graph_node_headers" type="bool" setter="" getter="">
</member>
<member name="network/debug/remote_host" type="String" setter="" getter="">
</member>
<member name="network/debug/remote_port" type="int" setter="" getter="">
</member>
<member name="network/http_proxy/host" type="String" setter="" getter="">
</member>
<member name="network/http_proxy/port" type="int" setter="" getter="">
</member>
<member name="network/ssl/editor_ssl_certificates" type="String" setter="" getter="">
</member>
<member name="project_manager/sorting_order" type="int" setter="" getter="">
</member>
<member name="run/auto_save/save_before_running" type="bool" setter="" getter="">
</member>
<member name="run/output/always_clear_output_on_play" type="bool" setter="" getter="">
</member>
<member name="run/output/always_close_output_on_stop" type="bool" setter="" getter="">
</member>
<member name="run/output/always_open_output_on_play" type="bool" setter="" getter="">
</member>
<member name="run/output/font_size" type="int" setter="" getter="">
</member>
<member name="run/window_placement/rect" type="int" setter="" getter="">
</member>
<member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
</member>
<member name="run/window_placement/screen" type="int" setter="" getter="">
</member>
<member name="text_editor/appearance/code_folding" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/line_length_guideline_hard_column" type="int" setter="" getter="">
</member>
<member name="text_editor/appearance/line_length_guideline_soft_column" type="int" setter="" getter="">
</member>
<member name="text_editor/appearance/line_numbers_zero_padded" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/show_bookmark_gutter" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/show_breakpoint_gutter" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/show_info_gutter" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/show_line_length_guidelines" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/show_line_numbers" type="bool" setter="" getter="">
</member>
<member name="text_editor/appearance/word_wrap" type="bool" setter="" getter="">
</member>
<member name="text_editor/completion/add_type_hints" type="bool" setter="" getter="">
</member>
<member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">
</member>
<member name="text_editor/completion/callhint_tooltip_offset" type="Vector2" setter="" getter="">
</member>
<member name="text_editor/completion/code_complete_delay" type="float" setter="" getter="">
</member>
<member name="text_editor/completion/complete_file_paths" type="bool" setter="" getter="">
</member>
<member name="text_editor/completion/idle_parse_delay" type="float" setter="" getter="">
</member>
<member name="text_editor/completion/put_callhint_tooltip_below_current_line" type="bool" setter="" getter="">
</member>
<member name="text_editor/completion/use_single_quotes" type="bool" setter="" getter="">
</member>
<member name="text_editor/cursor/block_caret" type="bool" setter="" getter="">
</member>
<member name="text_editor/cursor/caret_blink" type="bool" setter="" getter="">
</member>
<member name="text_editor/cursor/caret_blink_speed" type="float" setter="" getter="">
</member>
<member name="text_editor/cursor/right_click_moves_caret" type="bool" setter="" getter="">
</member>
<member name="text_editor/cursor/scroll_past_end_of_file" type="bool" setter="" getter="">
</member>
<member name="text_editor/files/auto_reload_and_parse_scripts_on_save" type="bool" setter="" getter="">
</member>
<member name="text_editor/files/auto_reload_scripts_on_external_change" type="bool" setter="" getter="">
</member>
<member name="text_editor/files/autosave_interval_secs" type="int" setter="" getter="">
</member>
<member name="text_editor/files/restore_scripts_on_load" type="bool" setter="" getter="">
</member>
<member name="text_editor/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter="">
</member>
<member name="text_editor/help/help_font_size" type="int" setter="" getter="">
</member>
<member name="text_editor/help/help_source_font_size" type="int" setter="" getter="">
</member>
<member name="text_editor/help/help_title_font_size" type="int" setter="" getter="">
</member>
<member name="text_editor/help/show_help_index" type="bool" setter="" getter="">
</member>
<member name="text_editor/highlighting/background_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/base_type_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/bookmark_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/brace_mismatch_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/breakpoint_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/caret_background_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/caret_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/code_folding_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/comment_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/completion_background_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/completion_existing_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/completion_font_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/completion_scroll_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/completion_selected_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/control_flow_keyword_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/current_line_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/engine_type_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/executing_line_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/function_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/highlight_all_occurrences" type="bool" setter="" getter="">
</member>
<member name="text_editor/highlighting/highlight_current_line" type="bool" setter="" getter="">
</member>
<member name="text_editor/highlighting/highlight_type_safe_lines" type="bool" setter="" getter="">
</member>
<member name="text_editor/highlighting/keyword_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/line_length_guideline_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/line_number_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/mark_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/member_variable_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/number_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/safe_line_number_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/search_result_border_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/search_result_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/selection_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/string_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/symbol_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/syntax_highlighting" type="bool" setter="" getter="">
</member>
<member name="text_editor/highlighting/text_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/text_selected_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/user_type_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/highlighting/word_highlighted_color" type="Color" setter="" getter="">
</member>
<member name="text_editor/indent/auto_indent" type="bool" setter="" getter="">
</member>
<member name="text_editor/indent/convert_indent_on_save" type="bool" setter="" getter="">
</member>
<member name="text_editor/indent/draw_spaces" type="bool" setter="" getter="">
</member>
<member name="text_editor/indent/draw_tabs" type="bool" setter="" getter="">
</member>
<member name="text_editor/indent/size" type="int" setter="" getter="">
</member>
<member name="text_editor/indent/type" type="int" setter="" getter="">
</member>
<member name="text_editor/navigation/drag_and_drop_selection" type="bool" setter="" getter="">
</member>
<member name="text_editor/navigation/minimap_width" type="int" setter="" getter="">
</member>
<member name="text_editor/navigation/mouse_extra_buttons_navigate_history" type="bool" setter="" getter="">
</member>
<member name="text_editor/navigation/show_minimap" type="bool" setter="" getter="">
</member>
<member name="text_editor/navigation/smooth_scrolling" type="bool" setter="" getter="">
</member>
<member name="text_editor/navigation/stay_in_script_editor_on_node_selected" type="bool" setter="" getter="">
</member>
<member name="text_editor/navigation/v_scroll_speed" type="int" setter="" getter="">
</member>
<member name="text_editor/script_list/show_members_overview" type="bool" setter="" getter="">
</member>
<member name="text_editor/theme/color_theme" type="String" setter="" getter="">
</member>
<member name="text_editor/theme/line_spacing" type="int" setter="" getter="">
</member>
<member name="text_editor/tools/create_signal_callbacks" type="bool" setter="" getter="">
</member>
<member name="text_editor/tools/sort_members_outline_alphabetically" type="bool" setter="" getter="">
</member>
</members>
<signals>
<signal name="settings_changed">
<description>

View File

@ -38,6 +38,7 @@
#include "core/object/script_language.h"
#include "core/string/translation.h"
#include "core/version.h"
#include "editor/editor_settings.h"
#include "scene/resources/theme.h"
#include "core/io/xml_parser.h"
#include "core/object/class_db.h"
@ -303,8 +304,15 @@ void DocData::generate(bool p_basic_types) {
List<PropertyInfo> properties;
List<PropertyInfo> own_properties;
if (name == "ProjectSettings") {
//special case for project settings, so settings can be documented
// Special case for editor and project settings, so they can be documented.
if (name == "EditorSettings") {
// We don't create the full blown EditorSettings (+ config file) with `create()`,
// instead we just make a local instance to get default values.
Ref<EditorSettings> edset = memnew(EditorSettings);
edset->get_property_list(&properties);
own_properties = properties;
} else if (name == "ProjectSettings") {
ProjectSettings::get_singleton()->get_property_list(&properties);
own_properties = properties;
} else {
@ -339,6 +347,13 @@ void DocData::generate(bool p_basic_types) {
bool default_value_valid = false;
Variant default_value;
if (name == "EditorSettings") {
if (E->get().name == "resource_local_to_scene" || E->get().name == "resource_name" || E->get().name == "resource_path" || E->get().name == "script") {
// Don't include spurious properties in the generated EditorSettings class reference.
continue;
}
}
if (name == "ProjectSettings") {
// Special case for project settings, so that settings are not taken from the current project's settings
if (E->get().name == "script" ||