mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Expose get_export_option_visibility to editor plugins
This commit is contained in:
committed by
Fredia Huya-Kouadio
parent
84dcdde908
commit
7a909896f7
@@ -135,8 +135,29 @@ String EditorExportPreset::_get_property_warning(const StringName &p_name) const
|
||||
|
||||
void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
for (const KeyValue<StringName, PropertyInfo> &E : properties) {
|
||||
if (!value_overrides.has(E.key) && platform->get_export_option_visibility(this, E.key)) {
|
||||
p_list->push_back(E.value);
|
||||
if (!value_overrides.has(E.key)) {
|
||||
bool property_visible = platform->get_export_option_visibility(this, E.key);
|
||||
if (!property_visible) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get option visibility from editor export plugins.
|
||||
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
||||
for (int i = 0; i < export_plugins.size(); i++) {
|
||||
if (!export_plugins[i]->supports_platform(platform)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
export_plugins.write[i]->set_export_preset(Ref<EditorExportPreset>(this));
|
||||
property_visible = export_plugins[i]->_get_export_option_visibility(platform, E.key);
|
||||
if (!property_visible) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (property_visible) {
|
||||
p_list->push_back(E.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user