summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/create_dialog.cpp3
-rw-r--r--editor/editor_node.cpp8
-rw-r--r--editor/editor_node.h3
-rw-r--r--editor/project_export.cpp27
4 files changed, 32 insertions, 9 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 7788d6349a..df423bfa0e 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -59,7 +59,8 @@ void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const St
String l = f->get_line().strip_edges();
String name = l.split(" ")[0];
- if (ClassDB::class_exists(name) || ScriptServer::is_global_class(name)) {
+ if ((ClassDB::class_exists(name) || ScriptServer::is_global_class(name)) && !_is_class_disabled_by_feature_profile(name)) {
+
TreeItem *ti = recent->create_item(root);
ti->set_text(0, l);
ti->set_icon(0, EditorNode::get_singleton()->get_class_icon(l, base_type));
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index d7bc959729..0be0ea90a3 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -585,10 +585,7 @@ void EditorNode::_fs_changed() {
export_error = vformat("Export preset '%s' doesn't have a matching platform.", preset_name);
} else {
Error err = OK;
- // FIXME: This way to export only resources .pck or .zip is pretty hacky
- // and undocumented, and might be problematic for platforms where .zip is
- // a valid project export format (e.g. macOS).
- if (export_defer.path.ends_with(".pck") || export_defer.path.ends_with(".zip")) {
+ if (export_defer.pack_only) { // Only export .pck or .zip data pack.
if (export_defer.path.ends_with(".zip")) {
err = platform->export_zip(preset, export_defer.debug, export_defer.path);
} else if (export_defer.path.ends_with(".pck")) {
@@ -3942,11 +3939,12 @@ void EditorNode::_editor_file_dialog_unregister(EditorFileDialog *p_dialog) {
Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
-Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug) {
+Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only) {
export_defer.preset = p_preset;
export_defer.path = p_path;
export_defer.debug = p_debug;
+ export_defer.pack_only = p_pack_only;
disable_progress_dialog = true;
return OK;
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 469ba76872..7f53f77c76 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -558,6 +558,7 @@ private:
String preset;
String path;
bool debug;
+ bool pack_only;
} export_defer;
bool disable_progress_dialog;
@@ -779,7 +780,7 @@ public:
void _copy_warning(const String &p_str);
- Error export_preset(const String &p_preset, const String &p_path, bool p_debug);
+ Error export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only);
static void register_editor_types();
static void unregister_editor_types();
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 73564191e1..d01ea49d66 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -1072,6 +1072,8 @@ ProjectExportDialog::ProjectExportDialog() {
main_vb->add_child(hbox);
hbox->set_v_size_flags(SIZE_EXPAND_FILL);
+ // Presets list.
+
VBoxContainer *preset_vb = memnew(VBoxContainer);
preset_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hbox->add_child(preset_vb);
@@ -1099,6 +1101,8 @@ ProjectExportDialog::ProjectExportDialog() {
preset_hb->add_child(delete_preset);
delete_preset->connect("pressed", this, "_delete_preset");
+ // Preset settings.
+
VBoxContainer *settings_vb = memnew(VBoxContainer);
settings_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hbox->add_child(settings_vb);
@@ -1119,18 +1123,24 @@ ProjectExportDialog::ProjectExportDialog() {
export_path->set_save_mode();
export_path->connect("property_changed", this, "_export_path_changed");
+ // Subsections.
+
sections = memnew(TabContainer);
sections->set_tab_align(TabContainer::ALIGN_LEFT);
sections->set_use_hidden_tabs_for_min_size(true);
settings_vb->add_child(sections);
sections->set_v_size_flags(SIZE_EXPAND_FILL);
+ // Main preset parameters.
+
parameters = memnew(EditorInspector);
sections->add_child(parameters);
parameters->set_name(TTR("Options"));
parameters->set_v_size_flags(SIZE_EXPAND_FILL);
parameters->connect("property_edited", this, "_update_parameters");
+ // Resources export parameters.
+
VBoxContainer *resources_vb = memnew(VBoxContainer);
sections->add_child(resources_vb);
resources_vb->set_name(TTR("Resources"));
@@ -1165,8 +1175,13 @@ ProjectExportDialog::ProjectExportDialog() {
exclude_filters);
exclude_filters->connect("text_changed", this, "_filter_changed");
+ // Patch packages.
+
VBoxContainer *patch_vb = memnew(VBoxContainer);
- sections->add_child(patch_vb);
+ // FIXME: Patching support doesn't seem properly implemented yet, so we hide it.
+ // The rest of the code is still kept for now, in the hope that it will be made
+ // functional and reactivated.
+ //sections->add_child(patch_vb);
patch_vb->set_name(TTR("Patches"));
patches = memnew(Tree);
@@ -1197,6 +1212,8 @@ ProjectExportDialog::ProjectExportDialog() {
patch_erase->connect("confirmed", this, "_patch_deleted");
add_child(patch_erase);
+ // Feature tags.
+
VBoxContainer *feature_vb = memnew(VBoxContainer);
feature_vb->set_name(TTR("Features"));
custom_features = memnew(LineEdit);
@@ -1210,6 +1227,8 @@ ProjectExportDialog::ProjectExportDialog() {
feature_vb->add_margin_child(TTR("Feature List:"), features_panel, true);
sections->add_child(feature_vb);
+ // Script export parameters.
+
updating_script_key = false;
VBoxContainer *script_vb = memnew(VBoxContainer);
@@ -1231,7 +1250,7 @@ ProjectExportDialog::ProjectExportDialog() {
sections->connect("tab_changed", this, "_tab_changed");
- //disable by default
+ // Disable by default.
name->set_editable(false);
export_path->hide();
runnable->set_disabled(true);
@@ -1241,11 +1260,15 @@ ProjectExportDialog::ProjectExportDialog() {
sections->hide();
parameters->edit(NULL);
+ // Deletion dialog.
+
delete_confirm = memnew(ConfirmationDialog);
add_child(delete_confirm);
delete_confirm->get_ok()->set_text(TTR("Delete"));
delete_confirm->connect("confirmed", this, "_delete_preset_confirm");
+ // Export buttons, dialogs and errors.
+
updating = false;
get_cancel()->set_text(TTR("Close"));