Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks

Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
This commit is contained in:
Rémi Verschelde
2020-05-14 13:23:58 +02:00
parent 710b34b702
commit 0be6d925dc
1552 changed files with 1 additions and 33876 deletions

View File

@@ -48,7 +48,6 @@
#include "scene/resources/resource_format_text.h"
static int _get_pad(int p_alignment, int p_n) {
int rest = p_n % p_alignment;
int pad = 0;
if (rest > 0) {
@@ -61,7 +60,6 @@ static int _get_pad(int p_alignment, int p_n) {
#define PCK_PADDING 16
bool EditorExportPreset::_set(const StringName &p_name, const Variant &p_value) {
if (values.has(p_name)) {
values[p_name] = p_value;
EditorExport::singleton->save_presets();
@@ -72,7 +70,6 @@ bool EditorExportPreset::_set(const StringName &p_name, const Variant &p_value)
}
bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
if (values.has(p_name)) {
r_ret = values[p_name];
return true;
@@ -82,9 +79,7 @@ bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
}
void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
for (const List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
if (platform->get_option_visibility(E->get().name, values)) {
p_list->push_back(E->get());
}
@@ -92,12 +87,10 @@ void EditorExportPreset::_get_property_list(List<PropertyInfo> *p_list) const {
}
Ref<EditorExportPlatform> EditorExportPreset::get_platform() const {
return platform;
}
Vector<String> EditorExportPreset::get_files_to_export() const {
Vector<String> files;
for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) {
files.push_back(E->get());
@@ -115,18 +108,15 @@ String EditorExportPreset::get_name() const {
}
void EditorExportPreset::set_runnable(bool p_enable) {
runnable = p_enable;
EditorExport::singleton->save_presets();
}
bool EditorExportPreset::is_runnable() const {
return runnable;
}
void EditorExportPreset::set_export_filter(ExportFilter p_filter) {
export_filter = p_filter;
EditorExport::singleton->save_presets();
}
@@ -136,18 +126,15 @@ EditorExportPreset::ExportFilter EditorExportPreset::get_export_filter() const {
}
void EditorExportPreset::set_include_filter(const String &p_include) {
include_filter = p_include;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_include_filter() const {
return include_filter;
}
void EditorExportPreset::set_export_path(const String &p_path) {
export_path = p_path;
/* NOTE(SonerSound): if there is a need to implement a PropertyHint that specifically indicates a relative path,
* this should be removed. */
@@ -159,23 +146,19 @@ void EditorExportPreset::set_export_path(const String &p_path) {
}
String EditorExportPreset::get_export_path() const {
return export_path;
}
void EditorExportPreset::set_exclude_filter(const String &p_exclude) {
exclude_filter = p_exclude;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_exclude_filter() const {
return exclude_filter;
}
void EditorExportPreset::add_export_file(const String &p_path) {
selected_files.insert(p_path);
EditorExport::singleton->save_presets();
}
@@ -186,12 +169,10 @@ void EditorExportPreset::remove_export_file(const String &p_path) {
}
bool EditorExportPreset::has_export_file(const String &p_path) {
return selected_files.has(p_path);
}
void EditorExportPreset::add_patch(const String &p_path, int p_at_pos) {
if (p_at_pos < 0)
patches.push_back(p_path);
else
@@ -210,7 +191,6 @@ void EditorExportPreset::set_patch(int p_index, const String &p_path) {
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_patch(int p_index) {
ERR_FAIL_INDEX_V(p_index, patches.size(), String());
return patches[p_index];
}
@@ -220,42 +200,35 @@ Vector<String> EditorExportPreset::get_patches() const {
}
void EditorExportPreset::set_custom_features(const String &p_custom_features) {
custom_features = p_custom_features;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_custom_features() const {
return custom_features;
}
void EditorExportPreset::set_script_export_mode(int p_mode) {
script_mode = p_mode;
EditorExport::singleton->save_presets();
}
int EditorExportPreset::get_script_export_mode() const {
return script_mode;
}
void EditorExportPreset::set_script_encryption_key(const String &p_key) {
script_key = p_key;
EditorExport::singleton->save_presets();
}
String EditorExportPreset::get_script_encryption_key() const {
return script_key;
}
///////////////////////////////////
void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) {
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
@@ -274,7 +247,6 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
}
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
r_flags.push_back("--remote-debug");
r_flags.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
@@ -283,11 +255,9 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
r_flags.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
bpoints += E->get().replace(" ", "%20");
if (E->next())
bpoints += ",";
@@ -298,18 +268,15 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
}
if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
r_flags.push_back("--debug-collisions");
}
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
r_flags.push_back("--debug-navigation");
}
}
Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
PackData *pd = (PackData *)p_userdata;
SavedData sd;
@@ -342,7 +309,6 @@ Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_pa
}
Error EditorExportPlatform::_save_zip_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
String path = p_path.replace_first("res://", "");
ZipData *zd = (ZipData *)p_userdata;
@@ -377,7 +343,6 @@ Ref<ImageTexture> EditorExportPlatform::get_option_icon(int p_index) const {
}
String EditorExportPlatform::find_export_template(String template_file_name, String *err) const {
String current_version = VERSION_FULL_CONFIG;
String template_path = EditorSettings::get_singleton()->get_templates_dir().plus_file(current_version).plus_file(template_file_name);
@@ -397,7 +362,6 @@ bool EditorExportPlatform::exists_export_template(String template_file_name, Str
}
Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
Ref<EditorExportPreset> preset;
preset.instance();
preset->platform = Ref<EditorExportPlatform>(this);
@@ -406,7 +370,6 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
get_export_options(&options);
for (List<ExportOption>::Element *E = options.front(); E; E = E->next()) {
preset->properties.push_back(E->get().option);
preset->values[E->get().option.name] = E->get().default_value;
}
@@ -415,7 +378,6 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
}
void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, Set<String> &p_paths) {
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
_export_find_resources(p_dir->get_subdir(i), p_paths);
}
@@ -426,7 +388,6 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d
}
void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<String> &p_paths) {
if (p_paths.has(p_path))
return;
@@ -441,13 +402,11 @@ void EditorExportPlatform::_export_find_dependencies(const String &p_path, Set<S
Vector<String> deps = dir->get_file_deps(file_idx);
for (int i = 0; i < deps.size(); i++) {
_export_find_dependencies(deps[i], p_paths);
}
}
void EditorExportPlatform::_edit_files_with_filter(DirAccess *da, const Vector<String> &p_filters, Set<String> &r_list, bool exclude) {
da->list_dir_begin();
String cur_dir = da->get_current_dir().replace("\\", "/");
if (!cur_dir.ends_with("/"))
@@ -488,7 +447,6 @@ void EditorExportPlatform::_edit_files_with_filter(DirAccess *da, const Vector<S
}
void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &p_filter, bool exclude) {
if (p_filter == "")
return;
Vector<String> split = p_filter.split(",");
@@ -507,19 +465,16 @@ void EditorExportPlatform::_edit_filter_list(Set<String> &r_list, const String &
}
void EditorExportPlugin::set_export_preset(const Ref<EditorExportPreset> &p_preset) {
if (p_preset.is_valid()) {
export_preset = p_preset;
}
}
Ref<EditorExportPreset> EditorExportPlugin::get_export_preset() const {
return export_preset;
}
void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
ExtraFile ef;
ef.data = p_file;
ef.path = p_path;
@@ -528,7 +483,6 @@ void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p
}
void EditorExportPlugin::add_shared_object(const String &p_path, const Vector<String> &tags) {
shared_objects.push_back(SharedObject(p_path, tags));
}
@@ -584,21 +538,18 @@ Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
}
void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
if (get_script_instance()) {
get_script_instance()->call("_export_file", p_path, p_type, p_features);
}
}
void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
if (get_script_instance()) {
get_script_instance()->call("_export_begin", p_features, p_debug, p_path, p_flags);
}
}
void EditorExportPlugin::_export_end_script() {
if (get_script_instance()) {
get_script_instance()->call("_export_end");
}
@@ -611,12 +562,10 @@ void EditorExportPlugin::_export_begin(const Set<String> &p_features, bool p_deb
}
void EditorExportPlugin::skip() {
skipped = true;
}
void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_shared_object", "path", "tags"), &EditorExportPlugin::add_shared_object);
ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
@@ -649,7 +598,6 @@ EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_contai
}
if (p_preset->get_custom_features() != String()) {
Vector<String> tmp_custom_list = p_preset->get_custom_features().split(",");
for (int i = 0; i < tmp_custom_list.size(); i++) {
@@ -716,7 +664,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
for (int i = 0; i < export_plugins.size(); i++) {
export_plugins.write[i]->set_export_preset(p_preset);
if (p_so_func) {
@@ -740,7 +687,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
int total = paths.size();
for (Set<String>::Element *E = paths.front(); E; E = E->next()) {
String path = E->get();
String type = ResourceLoader::get_resource_type(path);
@@ -760,7 +706,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Set<String> remap_features;
for (List<String>::Element *F = remaps.front(); F; F = F->next()) {
String remap = F->get();
String feature = remap.get_slice(".", 1);
if (features.has(feature)) {
@@ -775,7 +720,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
err = OK;
for (List<String>::Element *F = remaps.front(); F; F = F->next()) {
String remap = F->get();
if (remap == "path") {
String remapped_path = config->get_value("remap", remap);
@@ -805,7 +749,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
} else {
bool do_export = true;
for (int i = 0; i < export_plugins.size(); i++) {
if (export_plugins[i]->get_script_instance()) { //script based
@@ -851,7 +794,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
Vector<String> custom_list;
if (p_preset->get_custom_features() != String()) {
Vector<String> tmp_custom_list = p_preset->get_custom_features().split(",");
for (int i = 0; i < tmp_custom_list.size(); i++) {
@@ -917,7 +859,6 @@ Error EditorExportPlatform::_add_shared_object(void *p_userdata, const SharedObj
}
Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, const String &p_path, Vector<SharedObject> *p_so_files, bool p_embed, int64_t *r_embedded_start, int64_t *r_embedded_size) {
EditorProgress ep("savepack", TTR("Packing"), 102, true);
String tmppath = EditorSettings::get_singleton()->get_cache_dir().plus_file("packtmp");
@@ -1002,7 +943,6 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
int header_padding = _get_pad(PCK_PADDING, header_size);
for (int i = 0; i < pd.file_ofs.size(); i++) {
int string_len = pd.file_ofs[i].path_utf8.length();
int pad = _get_pad(4, string_len);
@@ -1034,7 +974,6 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
uint8_t buf[bufsize];
while (true) {
int got = ftmp->get_buffer(buf, bufsize);
if (got <= 0)
break;
@@ -1067,7 +1006,6 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
}
Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
EditorProgress ep("savezip", TTR("Packing"), 102, true);
FileAccess *src_f;
@@ -1098,7 +1036,6 @@ Error EditorExportPlatform::export_zip(const Ref<EditorExportPreset> &p_preset,
}
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
@@ -1117,7 +1054,6 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
}
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
r_flags.push_back("--remote-debug");
r_flags.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
@@ -1126,11 +1062,9 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
r_flags.push_back("--breakpoints");
String bpoints;
for (const List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
bpoints += E->get().replace(" ", "%20");
if (E->next())
bpoints += ",";
@@ -1141,12 +1075,10 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
}
if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) {
r_flags.push_back("--debug-collisions");
}
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
r_flags.push_back("--debug-navigation");
}
}
@@ -1158,11 +1090,9 @@ EditorExportPlatform::EditorExportPlatform() {
EditorExport *EditorExport::singleton = nullptr;
void EditorExport::_save() {
Ref<ConfigFile> config;
config.instance();
for (int i = 0; i < export_presets.size(); i++) {
Ref<EditorExportPreset> preset = export_presets[i];
String section = "preset." + itos(i);
@@ -1208,7 +1138,6 @@ void EditorExport::_save() {
}
void EditorExport::save_presets() {
if (block_save)
return;
save_timer->start();
@@ -1218,24 +1147,20 @@ void EditorExport::_bind_methods() {
}
void EditorExport::add_export_platform(const Ref<EditorExportPlatform> &p_platform) {
export_platforms.push_back(p_platform);
}
int EditorExport::get_export_platform_count() {
return export_platforms.size();
}
Ref<EditorExportPlatform> EditorExport::get_export_platform(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, export_platforms.size(), Ref<EditorExportPlatform>());
return export_platforms[p_idx];
}
void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, int p_at_pos) {
if (p_at_pos < 0)
export_presets.push_back(p_preset);
else
@@ -1243,7 +1168,6 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
bool etc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc");
bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2");
@@ -1258,48 +1182,40 @@ String EditorExportPlatform::test_etc2() const {
}
int EditorExport::get_export_preset_count() const {
return export_presets.size();
}
Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, export_presets.size(), Ref<EditorExportPreset>());
return export_presets[p_idx];
}
void EditorExport::remove_export_preset(int p_idx) {
export_presets.remove(p_idx);
save_presets();
}
void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
if (export_plugins.find(p_plugin) == -1) {
export_plugins.push_back(p_plugin);
}
}
void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
export_plugins.erase(p_plugin);
}
Vector<Ref<EditorExportPlugin>> EditorExport::get_export_plugins() {
return export_plugins;
}
void EditorExport::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
load_config();
}
}
void EditorExport::load_config() {
Ref<ConfigFile> config;
config.instance();
Error err = config->load("res://export_presets.cfg");
@@ -1310,7 +1226,6 @@ void EditorExport::load_config() {
int index = 0;
while (true) {
String section = "preset." + itos(index);
if (!config->has_section(section))
break;
@@ -1353,7 +1268,6 @@ void EditorExport::load_config() {
}
if (get_files) {
Vector<String> files = config->get_value(section, "export_files");
for (int i = 0; i < files.size(); i++) {
@@ -1385,7 +1299,6 @@ void EditorExport::load_config() {
config->get_section_keys(option_section, &options);
for (List<String>::Element *E = options.front(); E; E = E->next()) {
Variant value = config->get_value(option_section, E->get());
preset->set(E->get(), value);
@@ -1399,7 +1312,6 @@ void EditorExport::load_config() {
}
bool EditorExport::poll_export_platforms() {
bool changed = false;
for (int i = 0; i < export_platforms.size(); i++) {
if (export_platforms.write[i]->poll_export()) {
@@ -1411,7 +1323,6 @@ bool EditorExport::poll_export_platforms() {
}
EditorExport::EditorExport() {
save_timer = memnew(Timer);
add_child(save_timer);
save_timer->set_wait_time(0.8);
@@ -1428,7 +1339,6 @@ EditorExport::~EditorExport() {
//////////
void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}
@@ -1447,7 +1357,6 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/etc"), false));
@@ -1460,21 +1369,17 @@ void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
}
String EditorExportPlatformPC::get_name() const {
return name;
}
String EditorExportPlatformPC::get_os_name() const {
return os_name;
}
Ref<Texture2D> EditorExportPlatformPC::get_logo() const {
return logo;
}
bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
String err;
bool valid = false;
@@ -1537,7 +1442,6 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
template_path = template_path.strip_edges();
if (template_path == String()) {
if (p_preset->get("binary_format/64_bits")) {
if (p_debug) {
template_path = find_export_template(debug_file_64);
@@ -1576,7 +1480,6 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
int64_t embedded_size;
err = save_pack(p_preset, pck_path, &so_files, p_preset->get("binary_format/embed_pck"), &embedded_pos, &embedded_size);
if (err == OK && p_preset->get("binary_format/embed_pck")) {
if (embedded_size >= 0x100000000 && !p_preset->get("binary_format/64_bits")) {
EditorNode::get_singleton()->show_warning(TTR("On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."));
return ERR_INVALID_PARAMETER;
@@ -1625,25 +1528,20 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
}
void EditorExportPlatformPC::set_release_64(const String &p_file) {
release_file_64 = p_file;
}
void EditorExportPlatformPC::set_release_32(const String &p_file) {
release_file_32 = p_file;
}
void EditorExportPlatformPC::set_debug_64(const String &p_file) {
debug_file_64 = p_file;
}
void EditorExportPlatformPC::set_debug_32(const String &p_file) {
debug_file_32 = p_file;
}
void EditorExportPlatformPC::add_platform_feature(const String &p_feature) {
extra_features.insert(p_feature);
}
@@ -1657,7 +1555,6 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
}
void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
if (p_features.has("bptc")) {
if (p_preset->has("texture_format/no_bptc_fallbacks")) {
p_features.erase("s3tc");
@@ -1666,27 +1563,22 @@ void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<Edito
}
int EditorExportPlatformPC::get_chmod_flags() const {
return chmod_flags;
}
void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
chmod_flags = p_flags;
}
EditorExportPlatformPC::FixUpEmbeddedPckFunc EditorExportPlatformPC::get_fixup_embedded_pck_func() const {
return fixup_embedded_pck_func;
}
void EditorExportPlatformPC::set_fixup_embedded_pck_func(FixUpEmbeddedPckFunc p_fixup_embedded_pck_func) {
fixup_embedded_pck_func = p_fixup_embedded_pck_func;
}
EditorExportPlatformPC::EditorExportPlatformPC() {
chmod_flags = -1;
fixup_embedded_pck_func = nullptr;
}
@@ -1694,7 +1586,6 @@ EditorExportPlatformPC::EditorExportPlatformPC() {
///////////////////////
void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
String extension = p_path.get_extension().to_lower();
if (extension != "tres" && extension != "tscn") {
return;
@@ -1719,6 +1610,5 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con
}
EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() {
GLOBAL_DEF("editor/convert_text_resources_to_binary_on_export", false);
}