Merge pull request #96980 from m4gr3d/enable_legacy_build_customization_by_plugin
Expose `get_export_option_visibility` to editor plugins
This commit is contained in:
@ -136,8 +136,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