mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Get real default values for project settings in documentation
Also, ignore custom project settings and values for input/ entries Fixes #34154
This commit is contained in:
parent
829d21f1c2
commit
387ee7d763
@ -468,31 +468,31 @@
|
||||
<member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter="" default="3">
|
||||
Timer for detecting idle in the editor (in seconds).
|
||||
</member>
|
||||
<member name="input/ui_accept" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null), Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null), Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_accept" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_cancel" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_cancel" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_down" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_down" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_end" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null) ]}">
|
||||
<member name="input/ui_end" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_focus_next" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) ]}">
|
||||
<member name="input/ui_focus_next" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_focus_prev" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) ]}">
|
||||
<member name="input/ui_focus_prev" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_home" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null) ]}">
|
||||
<member name="input/ui_home" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_left" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_left" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_page_down" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777236,"unicode":0,"echo":false,"script":null) ]}">
|
||||
<member name="input/ui_page_down" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_page_up" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777235,"unicode":0,"echo":false,"script":null) ]}">
|
||||
<member name="input/ui_page_up" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_right" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_right" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_select" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_select" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input/ui_up" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) ]}">
|
||||
<member name="input/ui_up" type="Dictionary" setter="" getter="">
|
||||
</member>
|
||||
<member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen.
|
||||
@ -893,8 +893,6 @@
|
||||
<member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
|
||||
</member>
|
||||
<member name="script" type="Script" setter="" getter="">
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
</constants>
|
||||
|
@ -280,13 +280,27 @@ void DocData::generate(bool p_basic_types) {
|
||||
prop.overridden = inherited;
|
||||
|
||||
bool default_value_valid = false;
|
||||
Variant default_value = get_documentation_default_value(name, E->get().name, default_value_valid);
|
||||
Variant default_value;
|
||||
|
||||
if (inherited) {
|
||||
bool base_default_value_valid = false;
|
||||
Variant base_default_value = get_documentation_default_value(ClassDB::get_parent_class(name), E->get().name, base_default_value_valid);
|
||||
if (!default_value_valid || !base_default_value_valid || default_value == base_default_value)
|
||||
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" ||
|
||||
ProjectSettings::get_singleton()->get_order(E->get().name) >= ProjectSettings::NO_BUILTIN_ORDER_BASE) {
|
||||
continue;
|
||||
}
|
||||
if (E->get().usage & PROPERTY_USAGE_EDITOR) {
|
||||
default_value = ProjectSettings::get_singleton()->property_get_revert(E->get().name);
|
||||
default_value_valid = true;
|
||||
}
|
||||
} else {
|
||||
default_value = get_documentation_default_value(name, E->get().name, default_value_valid);
|
||||
|
||||
if (inherited) {
|
||||
bool base_default_value_valid = false;
|
||||
Variant base_default_value = get_documentation_default_value(ClassDB::get_parent_class(name), E->get().name, base_default_value_valid);
|
||||
if (!default_value_valid || !base_default_value_valid || default_value == base_default_value)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (default_value_valid && default_value.get_type() != Variant::OBJECT) {
|
||||
|
Loading…
Reference in New Issue
Block a user