mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[Export] Add readable descriptions and validation warnings to the export options.
This commit is contained in:
parent
1b4b8934e0
commit
0088981c40
49 changed files with 2215 additions and 391 deletions
|
@ -40,6 +40,7 @@
|
|||
#include "core/string/translation.h"
|
||||
#include "core/version.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/export/editor_export.h"
|
||||
#include "scene/resources/theme.h"
|
||||
#include "scene/theme/theme_db.h"
|
||||
|
||||
|
@ -396,6 +397,16 @@ void DocTools::generate(bool p_basic_types) {
|
|||
} else if (name == "ProjectSettings") {
|
||||
ProjectSettings::get_singleton()->get_property_list(&properties);
|
||||
own_properties = properties;
|
||||
} else if (name.begins_with("EditorExportPlatform") && ClassDB::can_instantiate(name)) {
|
||||
Ref<EditorExportPlatform> platform = Object::cast_to<EditorExportPlatform>(ClassDB::instantiate(name));
|
||||
if (platform.is_valid()) {
|
||||
List<EditorExportPlatform::ExportOption> options;
|
||||
platform->get_export_options(&options);
|
||||
for (const EditorExportPlatform::ExportOption &E : options) {
|
||||
properties.push_back(E.option);
|
||||
}
|
||||
own_properties = properties;
|
||||
}
|
||||
} else {
|
||||
ClassDB::get_property_list(name, &properties);
|
||||
ClassDB::get_property_list(name, &own_properties, true);
|
||||
|
@ -438,6 +449,12 @@ void DocTools::generate(bool p_basic_types) {
|
|||
}
|
||||
}
|
||||
|
||||
if (name.begins_with("EditorExportPlatform")) {
|
||||
if (E.name == "script") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (name == "ProjectSettings") {
|
||||
// Special case for project settings, so that settings are not taken from the current project's settings
|
||||
if (E.name == "script" || !ProjectSettings::get_singleton()->is_builtin_setting(E.name)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue