summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/android_builds.yml2
-rw-r--r--.github/workflows/ios_builds.yml2
-rw-r--r--.github/workflows/linux_builds.yml2
-rw-r--r--.github/workflows/macos_builds.yml2
-rw-r--r--.github/workflows/windows_builds.yml2
-rw-r--r--doc/classes/Gradient.xml4
-rw-r--r--editor/localization_editor.cpp71
-rw-r--r--editor/localization_editor.h8
-rw-r--r--modules/fbx/editor_scene_importer_fbx.cpp15
-rw-r--r--scene/resources/gradient.cpp2
10 files changed, 59 insertions, 51 deletions
diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml
index f4b571fc08..143f3961cf 100644
--- a/.github/workflows/android_builds.yml
+++ b/.github/workflows/android_builds.yml
@@ -4,7 +4,7 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=android verbose=yes warnings=extra werror=yes --jobs=2
+ SCONSFLAGS: platform=android verbose=yes warnings=extra werror=yes --jobs=2 module_text_server_fb_enabled=yes
SCONS_CACHE_LIMIT: 4096
jobs:
diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml
index fa965a45f1..73a1b2934e 100644
--- a/.github/workflows/ios_builds.yml
+++ b/.github/workflows/ios_builds.yml
@@ -4,7 +4,7 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=iphone verbose=yes warnings=extra werror=yes --jobs=2
+ SCONSFLAGS: platform=iphone verbose=yes warnings=extra werror=yes --jobs=2 module_text_server_fb_enabled=yes
SCONS_CACHE_LIMIT: 4096
jobs:
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index b7b40eccbd..89e8f4d146 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -4,7 +4,7 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=linuxbsd verbose=yes warnings=extra werror=yes --jobs=2
+ SCONSFLAGS: platform=linuxbsd verbose=yes warnings=extra werror=yes --jobs=2 module_text_server_fb_enabled=yes
SCONS_CACHE_LIMIT: 4096
jobs:
diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml
index 401cfadc30..803c8f8ec4 100644
--- a/.github/workflows/macos_builds.yml
+++ b/.github/workflows/macos_builds.yml
@@ -4,7 +4,7 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=osx verbose=yes warnings=extra werror=yes --jobs=2
+ SCONSFLAGS: platform=osx verbose=yes warnings=extra werror=yes --jobs=2 module_text_server_fb_enabled=yes
SCONS_CACHE_LIMIT: 4096
jobs:
diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml
index e8f3d3d297..b9bf510c71 100644
--- a/.github/workflows/windows_builds.yml
+++ b/.github/workflows/windows_builds.yml
@@ -5,7 +5,7 @@ on: [push, pull_request]
# SCONS_CACHE for windows must be set in the build environment
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=windows verbose=yes warnings=all werror=yes --jobs=2
+ SCONSFLAGS: platform=windows verbose=yes warnings=all werror=yes --jobs=2 module_text_server_fb_enabled=yes
SCONS_CACHE_MSVC_CONFIG: true
SCONS_CACHE_LIMIT: 3072
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 4ccbdee144..28c647a1c3 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -57,10 +57,10 @@
<method name="remove_point">
<return type="void">
</return>
- <argument index="0" name="offset" type="int">
+ <argument index="0" name="point" type="int">
</argument>
<description>
- Removes the color at the index [code]offset[/code].
+ Removes the color at the index [code]point[/code].
</description>
</method>
<method name="set_color">
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 2a21885c4c..fbfc90a81d 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -78,18 +78,21 @@ void LocalizationEditor::_notification(int p_what) {
}
void LocalizationEditor::add_translation(const String &p_translation) {
- _translation_add(p_translation);
+ PackedStringArray translations;
+ translations.push_back(p_translation);
+ _translation_add(translations);
}
-void LocalizationEditor::_translation_add(const String &p_path) {
+void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) {
PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
- if (translations.has(p_path)) {
- return;
+ for (int i = 0; i < p_paths.size(); i++) {
+ if (!translations.has(p_paths[i])) {
+ // Don't add duplicate translation paths.
+ translations.push_back(p_paths[i]);
+ }
}
- translations.push_back(p_path);
-
- undo_redo->create_action(TTR("Add Translation"));
+ undo_redo->create_action(vformat(TTR("Add %d Translations"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations", translations);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations", ProjectSettings::get_singleton()->get("locale/translations"));
undo_redo->add_do_method(this, "update_translations");
@@ -129,7 +132,7 @@ void LocalizationEditor::_translation_res_file_open() {
translation_res_file_open_dialog->popup_file_dialog();
}
-void LocalizationEditor::_translation_res_add(const String &p_path) {
+void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths) {
Variant prev;
Dictionary remaps;
@@ -138,13 +141,14 @@ void LocalizationEditor::_translation_res_add(const String &p_path) {
prev = remaps;
}
- if (remaps.has(p_path)) {
- return; //pointless already has it
+ for (int i = 0; i < p_paths.size(); i++) {
+ if (!remaps.has(p_paths[i])) {
+ // Don't overwrite with an empty remap array if an array already exists for the given path.
+ remaps[p_paths[i]] = PackedStringArray();
+ }
}
- remaps[p_path] = PackedStringArray();
-
- undo_redo->create_action(TTR("Add Remapped Path"));
+ undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Path(s)"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", prev);
undo_redo->add_do_method(this, "update_translations");
@@ -158,7 +162,7 @@ void LocalizationEditor::_translation_res_option_file_open() {
translation_res_option_file_open_dialog->popup_file_dialog();
}
-void LocalizationEditor::_translation_res_option_add(const String &p_path) {
+void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_paths) {
ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"));
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
@@ -170,10 +174,12 @@ void LocalizationEditor::_translation_res_option_add(const String &p_path) {
ERR_FAIL_COND(!remaps.has(key));
PackedStringArray r = remaps[key];
- r.push_back(p_path + ":" + "en");
+ for (int i = 0; i < p_paths.size(); i++) {
+ r.push_back(p_paths[i] + ":" + "en");
+ }
remaps[key] = r;
- undo_redo->create_action(TTR("Resource Remap Add Remap"));
+ undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Remap(s)"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
@@ -381,17 +387,20 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) {
undo_redo->commit_action();
}
-void LocalizationEditor::_pot_add(const String &p_path) {
+void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) {
PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files");
- for (int i = 0; i < pot_translations.size(); i++) {
- if (pot_translations[i] == p_path) {
- return; //exists
+ for (int i = 0; i < p_paths.size(); i++) {
+ for (int j = 0; j < pot_translations.size(); j++) {
+ if (pot_translations[j] == p_paths[i]) {
+ continue; //exists
+ }
}
+
+ pot_translations.push_back(p_paths[i]);
}
- pot_translations.push_back(p_path);
- undo_redo->create_action(TTR("Add files for POT generation"));
+ undo_redo->create_action(vformat(TTR("Add %d file(s) for POT generation"), p_paths.size()));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", pot_translations);
undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", ProjectSettings::get_singleton()->get("locale/translations_pot_files"));
undo_redo->add_do_method(this, "update_translations");
@@ -685,8 +694,8 @@ LocalizationEditor::LocalizationEditor() {
translations->add_child(tvb);
HBoxContainer *thb = memnew(HBoxContainer);
- thb->add_spacer();
thb->add_child(memnew(Label(TTR("Translations:"))));
+ thb->add_spacer();
tvb->add_child(thb);
Button *addtr = memnew(Button(TTR("Add...")));
@@ -702,8 +711,8 @@ LocalizationEditor::LocalizationEditor() {
tmc->add_child(translation_list);
translation_file_open = memnew(EditorFileDialog);
- translation_file_open->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- translation_file_open->connect("file_selected", callable_mp(this, &LocalizationEditor::_translation_add));
+ translation_file_open->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
+ translation_file_open->connect("files_selected", callable_mp(this, &LocalizationEditor::_translation_add));
add_child(translation_file_open);
}
@@ -732,8 +741,8 @@ LocalizationEditor::LocalizationEditor() {
tmc->add_child(translation_remap);
translation_res_file_open_dialog = memnew(EditorFileDialog);
- translation_res_file_open_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- translation_res_file_open_dialog->connect("file_selected", callable_mp(this, &LocalizationEditor::_translation_res_add));
+ translation_res_file_open_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
+ translation_res_file_open_dialog->connect("files_selected", callable_mp(this, &LocalizationEditor::_translation_res_add));
add_child(translation_res_file_open_dialog);
thb = memnew(HBoxContainer);
@@ -764,8 +773,8 @@ LocalizationEditor::LocalizationEditor() {
tmc->add_child(translation_remap_options);
translation_res_option_file_open_dialog = memnew(EditorFileDialog);
- translation_res_option_file_open_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- translation_res_option_file_open_dialog->connect("file_selected", callable_mp(this, &LocalizationEditor::_translation_res_option_add));
+ translation_res_option_file_open_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
+ translation_res_option_file_open_dialog->connect("files_selected", callable_mp(this, &LocalizationEditor::_translation_res_option_add));
add_child(translation_res_option_file_open_dialog);
}
@@ -825,8 +834,8 @@ LocalizationEditor::LocalizationEditor() {
add_child(pot_generate_dialog);
pot_file_open_dialog = memnew(EditorFileDialog);
- pot_file_open_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- pot_file_open_dialog->connect("file_selected", callable_mp(this, &LocalizationEditor::_pot_add));
+ pot_file_open_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
+ pot_file_open_dialog->connect("files_selected", callable_mp(this, &LocalizationEditor::_pot_add));
add_child(pot_file_open_dialog);
}
diff --git a/editor/localization_editor.h b/editor/localization_editor.h
index 43b6bb60f6..8705b7aa4d 100644
--- a/editor/localization_editor.h
+++ b/editor/localization_editor.h
@@ -72,22 +72,22 @@ class LocalizationEditor : public VBoxContainer {
String localization_changed;
void _translation_file_open();
- void _translation_add(const String &p_path);
+ void _translation_add(const PackedStringArray &p_paths);
void _translation_delete(Object *p_item, int p_column, int p_button);
void _translation_res_file_open();
- void _translation_res_add(const String &p_path);
+ void _translation_res_add(const PackedStringArray &p_paths);
void _translation_res_delete(Object *p_item, int p_column, int p_button);
void _translation_res_select();
void _translation_res_option_file_open();
- void _translation_res_option_add(const String &p_path);
+ void _translation_res_option_add(const PackedStringArray &p_paths);
void _translation_res_option_changed();
void _translation_res_option_delete(Object *p_item, int p_column, int p_button);
void _translation_filter_option_changed();
void _translation_filter_mode_changed(int p_mode);
- void _pot_add(const String &p_path);
+ void _pot_add(const PackedStringArray &p_paths);
void _pot_delete(Object *p_item, int p_column, int p_button);
void _pot_file_open();
void _pot_generate_open();
diff --git a/modules/fbx/editor_scene_importer_fbx.cpp b/modules/fbx/editor_scene_importer_fbx.cpp
index d37befbbfd..ff729a635f 100644
--- a/modules/fbx/editor_scene_importer_fbx.cpp
+++ b/modules/fbx/editor_scene_importer_fbx.cpp
@@ -63,8 +63,7 @@ void EditorSceneImporterFBX::get_extensions(List<String> *r_extensions) const {
const String fbx_str = "fbx";
Vector<String> exts;
exts.push_back(fbx_str);
- _register_project_setting_import(fbx_str, import_setting_string, exts, r_extensions,
- true);
+ _register_project_setting_import(fbx_str, import_setting_string, exts, r_extensions, true);
}
void EditorSceneImporterFBX::_register_project_setting_import(const String generic,
@@ -181,7 +180,7 @@ Node3D *EditorSceneImporterFBX::import_scene(const String &p_path, uint32_t p_fl
}
if (is_blender_fbx) {
- WARN_PRINT("Blender FBX files will not work properly with keyframes or skeletons until we make fixes stand by.");
+ WARN_PRINT("Blender FBX files will not work properly with keyframes or skeletons until we make fixes. Please stand by.");
}
Node3D *spatial = _generate_scene(p_path, &doc, p_flags, p_bake_fps, 8);
@@ -196,7 +195,7 @@ Node3D *EditorSceneImporterFBX::import_scene(const String &p_path, uint32_t p_fl
return spatial;
} else {
- print_error("Cannot import file: " + p_path + " version of file is unsupported, please re-export in your modelling package file version is: " + itos(doc.FBXVersion()));
+ ERR_PRINT(vformat("Cannot import FBX file: %s. It uses file format %d which is unsupported by Godot. Please re-export it or convert it to a newer format.", p_path, doc.FBXVersion()));
}
}
@@ -550,8 +549,8 @@ Node3D *EditorSceneImporterFBX::_generate_scene(
print_verbose("populating skeleton with bone: " + bone->bone_name);
- // // populate bone skeleton - since fbx has no DOM for the skeleton just a node.
- // bone->bone_skeleton = fbx_skeleton_inst;
+ //// populate bone skeleton - since fbx has no DOM for the skeleton just a node.
+ //bone->bone_skeleton = fbx_skeleton_inst;
// now populate bone on the armature node list
fbx_skeleton_inst->skeleton_bones.push_back(bone);
@@ -688,8 +687,8 @@ Node3D *EditorSceneImporterFBX::_generate_scene(
//
// Get Mesh Node Xform only
//
- // ERR_CONTINUE_MSG(!state.fbx_target_map.has(mesh_id), "invalid xform for the skin pose: " + itos(mesh_id));
- // Ref<FBXNode> mesh_node_xform_data = state.fbx_target_map[mesh_id];
+ //ERR_CONTINUE_MSG(!state.fbx_target_map.has(mesh_id), "invalid xform for the skin pose: " + itos(mesh_id));
+ //Ref<FBXNode> mesh_node_xform_data = state.fbx_target_map[mesh_id];
if (!mesh_skin) {
continue; // not a deformer.
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index 6b41b97e45..b14d48b099 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -47,7 +47,7 @@ Gradient::~Gradient() {
void Gradient::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_point", "offset", "color"), &Gradient::add_point);
- ClassDB::bind_method(D_METHOD("remove_point", "offset"), &Gradient::remove_point);
+ ClassDB::bind_method(D_METHOD("remove_point", "point"), &Gradient::remove_point);
ClassDB::bind_method(D_METHOD("set_offset", "point", "offset"), &Gradient::set_offset);
ClassDB::bind_method(D_METHOD("get_offset", "point"), &Gradient::get_offset);