summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--editor/animation_track_editor.cpp1
-rw-r--r--editor/connections_dialog.cpp1
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/debugger/editor_profiler.cpp1
-rw-r--r--editor/dependency_editor.cpp4
-rw-r--r--editor/editor_about.cpp1
-rw-r--r--editor/editor_asset_installer.cpp2
-rw-r--r--editor/editor_build_profile.cpp1
-rw-r--r--editor/editor_feature_profile.cpp1
-rw-r--r--editor/editor_help_search.cpp1
-rw-r--r--editor/editor_locale_dialog.cpp3
-rw-r--r--editor/editor_quick_open.cpp1
-rw-r--r--editor/editor_resource_picker.cpp1
-rw-r--r--editor/editor_sectioned_inspector.cpp1
-rw-r--r--editor/editor_settings_dialog.cpp1
-rw-r--r--editor/export/export_template_manager.cpp1
-rw-r--r--editor/export/project_export.cpp1
-rw-r--r--editor/filesystem_dock.cpp1
-rw-r--r--editor/find_in_files.cpp1
-rw-r--r--editor/groups_editor.cpp1
-rw-r--r--editor/import/3d/resource_importer_scene.cpp188
-rw-r--r--editor/import/3d/scene_import_settings.cpp74
-rw-r--r--editor/import/dynamic_font_import_settings.cpp4
-rw-r--r--editor/input_event_configuration_dialog.cpp1
-rw-r--r--editor/inspector_dock.cpp1
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp1
-rw-r--r--editor/plugins/animation_library_editor.cpp1
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp1
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp1
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp1
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp1
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp1
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_text_editor.cpp1
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/theme_editor_plugin.cpp3
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
-rw-r--r--editor/property_selector.cpp1
38 files changed, 302 insertions, 10 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 2746e9acb4..99ba35a6d0 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -7569,6 +7569,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_vbox->add_child(select_all_button);
track_copy_select = memnew(Tree);
+ track_copy_select->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
track_copy_select->set_h_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_hide_root(true);
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index ed90b796f7..362834d265 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -751,6 +751,7 @@ ConnectDialog::ConnectDialog() {
method_tree = memnew(Tree);
method_vbc->add_child(method_tree);
+ method_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
method_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
method_tree->set_hide_root(true);
method_tree->connect("item_selected", callable_mp(this, &ConnectDialog::_method_selected));
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 603b3505d4..4c66068953 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -779,6 +779,7 @@ CreateDialog::CreateDialog() {
vsc->add_child(fav_vb);
favorites = memnew(Tree);
+ favorites->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
favorites->set_hide_root(true);
favorites->set_hide_folding(true);
favorites->set_allow_reselect(true);
@@ -823,6 +824,7 @@ CreateDialog::CreateDialog() {
vbc->add_margin_child(TTR("Search:"), search_hb);
search_options = memnew(Tree);
+ search_options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
search_options->connect("item_activated", callable_mp(this, &CreateDialog::_confirmed));
search_options->connect("cell_selected", callable_mp(this, &CreateDialog::_item_selected));
vbc->add_margin_child(TTR("Matches:"), search_options, true);
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index 730160b331..c1500631fe 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -670,6 +670,7 @@ EditorProfiler::EditorProfiler() {
h_split->set_v_size_flags(SIZE_EXPAND_FILL);
variables = memnew(Tree);
+ variables->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
variables->set_custom_minimum_size(Size2(320, 0) * EDSCALE);
variables->set_hide_folding(true);
h_split->add_child(variables);
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 5eccc7673a..a178f8e3ec 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -246,6 +246,7 @@ DependencyEditor::DependencyEditor() {
add_child(vb);
tree = memnew(Tree);
+ tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_columns(2);
tree->set_column_titles_visible(true);
tree->set_column_title(0, TTR("Resource"));
@@ -672,6 +673,7 @@ DependencyRemoveDialog::DependencyRemoveDialog() {
vb->add_child(text);
owners = memnew(Tree);
+ owners->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
owners->set_hide_root(true);
vb->add_child(owners);
owners->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -724,6 +726,7 @@ DependencyErrorDialog::DependencyErrorDialog() {
add_child(vb);
files = memnew(Tree);
+ files->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
files->set_hide_root(true);
vb->add_margin_child(TTR("Load failed due to missing dependencies:"), files, true);
files->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -879,6 +882,7 @@ OrphanResourcesDialog::OrphanResourcesDialog() {
add_child(vbc);
files = memnew(Tree);
+ files->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
files->set_columns(2);
files->set_column_titles_visible(true);
files->set_column_custom_minimum_width(1, 100 * EDSCALE);
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index e594d53d69..61c4eed669 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -304,6 +304,7 @@ EditorAbout::EditorAbout() {
license_thirdparty->add_child(tpl_hbc);
_tpl_tree = memnew(Tree);
+ _tpl_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
_tpl_tree->set_hide_root(true);
TreeItem *root = _tpl_tree->create_item();
TreeItem *tpl_ti_all = _tpl_tree->create_item(root);
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 3c42f07f82..742dec8d69 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -735,6 +735,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
source_tree_vb->add_child(source_tree_label);
source_tree = memnew(Tree);
+ source_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
source_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
source_tree->connect("item_edited", callable_mp(this, &EditorAssetInstaller::_item_checked_cbk));
source_tree_vb->add_child(source_tree);
@@ -749,6 +750,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
destination_tree_vb->add_child(destination_tree_label);
destination_tree = memnew(Tree);
+ destination_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
destination_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
destination_tree->connect("item_edited", callable_mp(this, &EditorAssetInstaller::_item_checked_cbk));
destination_tree_vb->add_child(destination_tree);
diff --git a/editor/editor_build_profile.cpp b/editor/editor_build_profile.cpp
index 3d10b7949e..65bca1a935 100644
--- a/editor/editor_build_profile.cpp
+++ b/editor/editor_build_profile.cpp
@@ -854,6 +854,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
main_vbc->add_margin_child(TTR("Actions:"), profiles_hbc);
class_list = memnew(Tree);
+ class_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
class_list->set_hide_root(true);
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
class_list->connect("cell_selected", callable_mp(this, &EditorBuildProfileManager::_class_list_item_selected));
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index c08e99b2a4..5236f9e254 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -976,6 +976,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
class_list_vbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
class_list = memnew(Tree);
+ class_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
class_list_vbc->add_margin_child(TTR("Configure Selected Profile:"), class_list, true);
class_list->set_hide_root(true);
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 51df2716d7..ff381d68c0 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -356,6 +356,7 @@ EditorHelpSearch::EditorHelpSearch() {
// Create the results tree.
results_tree = memnew(Tree);
+ results_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
results_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
results_tree->set_columns(2);
results_tree->set_column_title(0, TTR("Name"));
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp
index f1d82557fd..1318b59685 100644
--- a/editor/editor_locale_dialog.cpp
+++ b/editor/editor_locale_dialog.cpp
@@ -433,6 +433,7 @@ EditorLocaleDialog::EditorLocaleDialog() {
}
{
lang_list = memnew(Tree);
+ lang_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
lang_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
lang_list->connect("cell_selected", callable_mp(this, &EditorLocaleDialog::_item_selected));
lang_list->set_columns(1);
@@ -452,6 +453,7 @@ EditorLocaleDialog::EditorLocaleDialog() {
}
{
script_list = memnew(Tree);
+ script_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
script_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
script_list->connect("cell_selected", callable_mp(this, &EditorLocaleDialog::_item_selected));
script_list->set_columns(1);
@@ -470,6 +472,7 @@ EditorLocaleDialog::EditorLocaleDialog() {
}
{
cnt_list = memnew(Tree);
+ cnt_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
cnt_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
cnt_list->connect("cell_selected", callable_mp(this, &EditorLocaleDialog::_item_selected));
cnt_list->set_columns(1);
diff --git a/editor/editor_quick_open.cpp b/editor/editor_quick_open.cpp
index f39872ba2c..6fd1fd687b 100644
--- a/editor/editor_quick_open.cpp
+++ b/editor/editor_quick_open.cpp
@@ -275,6 +275,7 @@ EditorQuickOpen::EditorQuickOpen() {
register_text_enter(search_box);
search_options = memnew(Tree);
+ search_options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
search_options->connect("item_activated", callable_mp(this, &EditorQuickOpen::_confirmed));
search_options->create_item();
search_options->set_hide_root(true);
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 5450040bea..1cb71aa933 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -382,6 +382,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
vb->add_child(label);
duplicate_resources_tree = memnew(Tree);
+ duplicate_resources_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
vb->add_child(duplicate_resources_tree);
duplicate_resources_tree->set_columns(2);
duplicate_resources_tree->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index 8d1f97f6b1..8e8908faaf 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -331,6 +331,7 @@ SectionedInspector::SectionedInspector() :
left_vb->set_custom_minimum_size(Size2(190, 0) * EDSCALE);
add_child(left_vb);
+ sections->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
sections->set_v_size_flags(SIZE_EXPAND_FILL);
sections->set_hide_root(true);
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index c339bbf365..d6946afbc1 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -789,6 +789,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
top_hbox->add_child(clear_all_search);
shortcuts = memnew(Tree);
+ shortcuts->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
shortcuts->set_v_size_flags(Control::SIZE_EXPAND_FILL);
shortcuts->set_columns(2);
shortcuts->set_hide_root(true);
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp
index 3738521491..9fad872a3b 100644
--- a/editor/export/export_template_manager.cpp
+++ b/editor/export/export_template_manager.cpp
@@ -1040,6 +1040,7 @@ ExportTemplateManager::ExportTemplateManager() {
installed_versions_hb->add_child(installed_label);
installed_table = memnew(Tree);
+ installed_table->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
installed_table->set_hide_root(true);
installed_table->set_custom_minimum_size(Size2(0, 100) * EDSCALE);
installed_table->set_v_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index cae814e77d..536e7a0f04 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -1321,6 +1321,7 @@ ProjectExportDialog::ProjectExportDialog() {
include_files = memnew(Tree);
include_margin->add_child(include_files);
+ include_files->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
include_files->connect("item_edited", callable_mp(this, &ProjectExportDialog::_tree_changed));
include_files->connect("check_propagated_to_item", callable_mp(this, &ProjectExportDialog::_check_propagated_to_item));
include_files->connect("custom_popup_edited", callable_mp(this, &ProjectExportDialog::_tree_popup_edited));
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index ca3a3efcdf..4521f4d3ff 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -3903,6 +3903,7 @@ FileSystemDock::FileSystemDock() {
tree = memnew(FileSystemTree);
tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
+ tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_hide_root(true);
SET_DRAG_FORWARDING_GCD(tree, FileSystemDock);
tree->set_allow_rmb_select(true);
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 965cb39df3..2d3f1a5b90 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -615,6 +615,7 @@ FindInFilesPanel::FindInFilesPanel() {
}
_results_display = memnew(Tree);
+ _results_display->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
_results_display->set_v_size_flags(SIZE_EXPAND_FILL);
_results_display->connect("item_selected", callable_mp(this, &FindInFilesPanel::_on_result_selected));
_results_display->connect("item_edited", callable_mp(this, &FindInFilesPanel::_on_item_edited));
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index ba7b627207..902e166fd9 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -842,6 +842,7 @@ GroupsEditor::GroupsEditor() {
hbc->add_child(filter);
tree = memnew(Tree);
+ tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_hide_root(true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
tree->set_allow_rmb_select(true);
diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp
index c9a2ca7588..8f06af7bdb 100644
--- a/editor/import/3d/resource_importer_scene.cpp
+++ b/editor/import/3d/resource_importer_scene.cpp
@@ -53,6 +53,7 @@
#include "scene/resources/3d/sphere_shape_3d.h"
#include "scene/resources/3d/world_boundary_shape_3d.h"
#include "scene/resources/animation.h"
+#include "scene/resources/bone_map.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/resource_format_text.h"
#include "scene/resources/surface_tool.h"
@@ -1222,6 +1223,74 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<
}
if (Object::cast_to<Skeleton3D>(p_node)) {
+ Ref<Animation> rest_animation;
+ float rest_animation_timestamp = 0.0;
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_node);
+ if (skeleton != nullptr && int(node_settings.get("rest_pose/load_pose", 0)) != 0) {
+ String selected_animation_name = node_settings.get("rest_pose/selected_animation", String());
+ if (int(node_settings["rest_pose/load_pose"]) == 1) {
+ TypedArray<Node> children = p_root->find_children("*", "AnimationPlayer", true, false);
+ for (int node_i = 0; node_i < children.size(); node_i++) {
+ AnimationPlayer *anim_player = cast_to<AnimationPlayer>(children[node_i]);
+ ERR_CONTINUE(anim_player == nullptr);
+ List<StringName> anim_list;
+ anim_player->get_animation_list(&anim_list);
+ if (anim_list.size() == 1) {
+ selected_animation_name = anim_list[0];
+ }
+ rest_animation = anim_player->get_animation(selected_animation_name);
+ if (rest_animation.is_valid()) {
+ break;
+ }
+ }
+ } else if (int(node_settings["rest_pose/load_pose"]) == 2) {
+ Object *external_object = node_settings.get("rest_pose/external_animation_library", Variant());
+ rest_animation = external_object;
+ if (rest_animation.is_null()) {
+ Ref<AnimationLibrary> library(external_object);
+ if (library.is_valid()) {
+ List<StringName> anim_list;
+ library->get_animation_list(&anim_list);
+ if (anim_list.size() == 1) {
+ selected_animation_name = String(anim_list[0]);
+ }
+ rest_animation = library->get_animation(selected_animation_name);
+ }
+ }
+ }
+ rest_animation_timestamp = double(node_settings.get("rest_pose/selected_timestamp", 0.0));
+ if (rest_animation.is_valid()) {
+ for (int track_i = 0; track_i < rest_animation->get_track_count(); track_i++) {
+ NodePath path = rest_animation->track_get_path(track_i);
+ StringName node_path = path.get_concatenated_names();
+ if (String(node_path).begins_with("%")) {
+ continue; // Unique node names are commonly used with retargeted animations, which we do not want to use.
+ }
+ StringName skeleton_bone = path.get_concatenated_subnames();
+ if (skeleton_bone == StringName()) {
+ continue;
+ }
+ int bone_idx = skeleton->find_bone(skeleton_bone);
+ if (bone_idx == -1) {
+ continue;
+ }
+ switch (rest_animation->track_get_type(track_i)) {
+ case Animation::TYPE_POSITION_3D: {
+ Vector3 bone_position = rest_animation->position_track_interpolate(track_i, rest_animation_timestamp);
+ skeleton->set_bone_rest(bone_idx, Transform3D(skeleton->get_bone_rest(bone_idx).basis, bone_position));
+ } break;
+ case Animation::TYPE_ROTATION_3D: {
+ Quaternion bone_rotation = rest_animation->rotation_track_interpolate(track_i, rest_animation_timestamp);
+ Transform3D current_rest = skeleton->get_bone_rest(bone_idx);
+ skeleton->set_bone_rest(bone_idx, Transform3D(Basis(bone_rotation).scaled(current_rest.basis.get_scale()), current_rest.origin));
+ } break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
ObjectID node_id = p_node->get_instance_id();
for (int i = 0; i < post_importer_plugins.size(); i++) {
post_importer_plugins.write[i]->internal_process(EditorScenePostImportPlugin::INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE, p_root, p_node, Ref<Resource>(), node_settings);
@@ -1810,6 +1879,34 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p
} break;
case INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "import/skip_import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "rest_pose/load_pose", PROPERTY_HINT_ENUM, "Default Pose,Use AnimationPlayer,Load External Animation", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::OBJECT, "rest_pose/external_animation_library", PROPERTY_HINT_RESOURCE_TYPE, "Animation,AnimationLibrary", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Variant()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "rest_pose/selected_animation", PROPERTY_HINT_ENUM, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), ""));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "rest_pose/selected_timestamp", PROPERTY_HINT_RANGE, "0,1,0.001,or_greater,suffix:s", PROPERTY_USAGE_DEFAULT), 0.0f));
+ String mismatched_or_empty_profile_warning = String(
+ "The external rest animation is missing some bones. "
+ "Consider disabling Remove Immutable Tracks on the other file."); // TODO: translate.
+ r_options->push_back(ImportOption(
+ PropertyInfo(
+ Variant::STRING, U"rest_pose/\u26A0_validation_warning/mismatched_or_empty_profile",
+ PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY),
+ Variant(mismatched_or_empty_profile_warning)));
+ String profile_must_not_be_retargeted_warning = String(
+ "This external rest animation appears to have been imported with a BoneMap. "
+ "Disable the bone map when exporting a rest animation from the reference model."); // TODO: translate.
+ r_options->push_back(ImportOption(
+ PropertyInfo(
+ Variant::STRING, U"rest_pose/\u26A0_validation_warning/profile_must_not_be_retargeted",
+ PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY),
+ Variant(profile_must_not_be_retargeted_warning)));
+ String no_animation_warning = String(
+ "Select an animation: Find a FBX or glTF in a compatible rest pose "
+ "and export a compatible animation from its import settings."); // TODO: translate.
+ r_options->push_back(ImportOption(
+ PropertyInfo(
+ Variant::STRING, U"rest_pose//no_animation_chosen",
+ PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY),
+ Variant(no_animation_warning)));
r_options->push_back(ImportOption(PropertyInfo(Variant::OBJECT, "retarget/bone_map", PROPERTY_HINT_RESOURCE_TYPE, "BoneMap", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Variant()));
} break;
default: {
@@ -1924,9 +2021,90 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor
}
} break;
case INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: {
- const bool use_retarget = p_options["retarget/bone_map"].get_validated_object() != nullptr;
- if (p_option != "retarget/bone_map" && p_option.begins_with("retarget/")) {
- return use_retarget;
+ const bool use_retarget = Object::cast_to<BoneMap>(p_options["retarget/bone_map"].get_validated_object()) != nullptr;
+ if (!use_retarget && p_option != "retarget/bone_map" && p_option.begins_with("retarget/")) {
+ return false;
+ }
+ int rest_warning = 0;
+ if (p_option.begins_with("rest_pose/")) {
+ if (!p_options.has("rest_pose/load_pose") || int(p_options["rest_pose/load_pose"]) == 0) {
+ if (p_option != "rest_pose/load_pose") {
+ return false;
+ }
+ } else if (int(p_options["rest_pose/load_pose"]) == 1) {
+ if (p_option == "rest_pose/external_animation_library") {
+ return false;
+ }
+ } else if (int(p_options["rest_pose/load_pose"]) == 2) {
+ Object *res = p_options["rest_pose/external_animation_library"];
+ Ref<Animation> anim(res);
+ if (anim.is_valid() && p_option == "rest_pose/selected_animation") {
+ return false;
+ }
+ Ref<AnimationLibrary> library(res);
+ String selected_animation_name = p_options["rest_pose/selected_animation"];
+ if (library.is_valid()) {
+ List<StringName> anim_list;
+ library->get_animation_list(&anim_list);
+ if (anim_list.size() == 1) {
+ selected_animation_name = String(anim_list[0]);
+ }
+ if (library->has_animation(selected_animation_name)) {
+ anim = library->get_animation(selected_animation_name);
+ }
+ }
+ int found_bone_count = 0;
+ Ref<BoneMap> bone_map;
+ Ref<SkeletonProfile> prof;
+ if (p_options.has("retarget/bone_map")) {
+ bone_map = p_options["retarget/bone_map"];
+ }
+ if (bone_map.is_valid()) {
+ prof = bone_map->get_profile();
+ }
+ if (anim.is_valid()) {
+ HashSet<StringName> target_bones;
+ if (bone_map.is_valid() && prof.is_valid()) {
+ for (int target_i = 0; target_i < prof->get_bone_size(); target_i++) {
+ StringName skeleton_bone_name = bone_map->get_skeleton_bone_name(prof->get_bone_name(target_i));
+ if (skeleton_bone_name) {
+ target_bones.insert(skeleton_bone_name);
+ }
+ }
+ }
+ for (int track_i = 0; track_i < anim->get_track_count(); track_i++) {
+ if (anim->track_get_type(track_i) != Animation::TYPE_POSITION_3D && anim->track_get_type(track_i) != Animation::TYPE_ROTATION_3D) {
+ continue;
+ }
+ NodePath path = anim->track_get_path(track_i);
+ StringName node_path = path.get_concatenated_names();
+ StringName skeleton_bone = path.get_concatenated_subnames();
+ if (skeleton_bone) {
+ if (String(node_path).begins_with("%")) {
+ rest_warning = 1;
+ }
+ if (target_bones.has(skeleton_bone)) {
+ target_bones.erase(skeleton_bone);
+ }
+ found_bone_count++;
+ }
+ }
+ if ((found_bone_count < 15 || !target_bones.is_empty()) && rest_warning != 1) {
+ rest_warning = 2; // heuristic: animation targeted too few bones.
+ }
+ } else {
+ rest_warning = 3;
+ }
+ }
+ if (p_option.begins_with("rest_pose/") && p_option.ends_with("profile_must_not_be_retargeted")) {
+ return rest_warning == 1;
+ }
+ if (p_option.begins_with("rest_pose/") && p_option.ends_with("mismatched_or_empty_profile")) {
+ return rest_warning == 2;
+ }
+ if (p_option.begins_with("rest_pose/") && p_option.ends_with("no_animation_chosen")) {
+ return rest_warning == 3;
+ }
}
} break;
default: {
@@ -2145,8 +2323,8 @@ Node *ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_
merge_angle = mesh_settings["lods/normal_merge_angle"];
}
- if (mesh_settings.has("save_to_file/enabled") && bool(mesh_settings["save_to_file/enabled"]) && mesh_settings.has("save_to_file/path")) {
- save_to_file = mesh_settings["save_to_file/path"];
+ if (bool(mesh_settings.get("save_to_file/enabled", false))) {
+ save_to_file = mesh_settings.get("save_to_file/path", String());
if (!save_to_file.is_resource_file()) {
save_to_file = "";
}
diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp
index 260684ae3d..e4f1da55a5 100644
--- a/editor/import/3d/scene_import_settings.cpp
+++ b/editor/import/3d/scene_import_settings.cpp
@@ -50,6 +50,8 @@ class SceneImportSettingsData : public Object {
HashMap<StringName, Variant> current;
HashMap<StringName, Variant> defaults;
List<ResourceImporter::ImportOption> options;
+ Vector<String> animation_list;
+
bool hide_options = false;
String path;
@@ -96,6 +98,7 @@ class SceneImportSettingsData : public Object {
}
return false;
}
+
bool _get(const StringName &p_name, Variant &r_ret) const {
if (settings) {
if (settings->has(p_name)) {
@@ -109,29 +112,81 @@ class SceneImportSettingsData : public Object {
}
return false;
}
- void _get_property_list(List<PropertyInfo> *p_list) const {
+
+ void handle_special_properties(PropertyInfo &r_option) const {
+ ERR_FAIL_NULL(settings);
+ if (r_option.name == "rest_pose/load_pose") {
+ if (!settings->has("rest_pose/load_pose") || int((*settings)["rest_pose/load_pose"]) != 2) {
+ (*settings)["rest_pose/external_animation_library"] = Variant();
+ }
+ }
+ if (r_option.name == "rest_pose/selected_animation") {
+ if (!settings->has("rest_pose/load_pose")) {
+ return;
+ }
+ String hint_string;
+
+ switch (int((*settings)["rest_pose/load_pose"])) {
+ case 1: {
+ hint_string = String(",").join(animation_list);
+ if (animation_list.size() == 1) {
+ (*settings)["rest_pose/selected_animation"] = animation_list[0];
+ }
+ } break;
+ case 2: {
+ Object *res = (*settings)["rest_pose/external_animation_library"];
+ Ref<Animation> anim(res);
+ Ref<AnimationLibrary> library(res);
+ if (anim.is_valid()) {
+ hint_string = anim->get_name();
+ }
+ if (library.is_valid()) {
+ List<StringName> anim_names;
+ library->get_animation_list(&anim_names);
+ if (anim_names.size() == 1) {
+ (*settings)["rest_pose/selected_animation"] = String(anim_names[0]);
+ }
+ for (StringName anim_name : anim_names) {
+ hint_string += "," + anim_name; // Include preceding, as a catch-all.
+ }
+ }
+ } break;
+ default:
+ break;
+ }
+ r_option.hint = PROPERTY_HINT_ENUM;
+ r_option.hint_string = hint_string;
+ }
+ }
+
+ void _get_property_list(List<PropertyInfo> *r_list) const {
if (hide_options) {
return;
}
for (const ResourceImporter::ImportOption &E : options) {
+ PropertyInfo option = E.option;
if (SceneImportSettingsDialog::get_singleton()->is_editing_animation()) {
if (category == ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_MAX) {
if (ResourceImporterScene::get_animation_singleton()->get_option_visibility(path, E.option.name, current)) {
- p_list->push_back(E.option);
+ handle_special_properties(option);
+ r_list->push_back(option);
}
} else {
if (ResourceImporterScene::get_animation_singleton()->get_internal_option_visibility(category, E.option.name, current)) {
- p_list->push_back(E.option);
+ handle_special_properties(option);
+ r_list->push_back(option);
}
}
} else {
if (category == ResourceImporterScene::INTERNAL_IMPORT_CATEGORY_MAX) {
if (ResourceImporterScene::get_scene_singleton()->get_option_visibility(path, E.option.name, current)) {
- p_list->push_back(E.option);
+ handle_special_properties(option);
+ r_list->push_back(option);
}
} else {
if (ResourceImporterScene::get_scene_singleton()->get_internal_option_visibility(category, E.option.name, current)) {
- p_list->push_back(E.option);
+ handle_special_properties(option);
+ r_list->push_back(option);
}
}
}
@@ -376,10 +431,15 @@ void SceneImportSettingsDialog::_fill_scene(Node *p_node, TreeItem *p_parent_ite
AnimationPlayer *anim_node = Object::cast_to<AnimationPlayer>(p_node);
if (anim_node) {
+ Vector<String> animation_list;
List<StringName> animations;
anim_node->get_animation_list(&animations);
for (const StringName &E : animations) {
_fill_animation(scene_tree, anim_node->get_animation(E), E, item);
+ animation_list.append(E);
+ }
+ if (scene_import_settings_data != nullptr) {
+ scene_import_settings_data->animation_list = animation_list;
}
}
@@ -1513,17 +1573,20 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
scene_tree = memnew(Tree);
scene_tree->set_name(TTR("Scene"));
+ scene_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
data_mode->add_child(scene_tree);
scene_tree->connect("cell_selected", callable_mp(this, &SceneImportSettingsDialog::_scene_tree_selected));
mesh_tree = memnew(Tree);
mesh_tree->set_name(TTR("Meshes"));
+ mesh_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
data_mode->add_child(mesh_tree);
mesh_tree->set_hide_root(true);
mesh_tree->connect("cell_selected", callable_mp(this, &SceneImportSettingsDialog::_mesh_tree_selected));
material_tree = memnew(Tree);
material_tree->set_name(TTR("Materials"));
+ material_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
data_mode->add_child(material_tree);
material_tree->connect("cell_selected", callable_mp(this, &SceneImportSettingsDialog::_material_tree_selected));
@@ -1659,6 +1722,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
external_paths->add_child(external_path_tree);
external_path_tree->connect("button_clicked", callable_mp(this, &SceneImportSettingsDialog::_browse_save_callback));
external_paths->connect("confirmed", callable_mp(this, &SceneImportSettingsDialog::_save_dir_confirm));
+ external_path_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
external_path_tree->set_columns(3);
external_path_tree->set_column_titles_visible(true);
external_path_tree->set_column_expand(0, true);
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index b892324ba4..f2096c362e 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -1375,6 +1375,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
add_var->connect("pressed", callable_mp(this, &DynamicFontImportSettingsDialog::_variation_add));
vars_list = memnew(Tree);
+ vars_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
vars_list->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
vars_list->set_hide_root(true);
vars_list->set_columns(2);
@@ -1427,6 +1428,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
page2_0_vb->add_child(page2_0_description);
locale_tree = memnew(Tree);
+ locale_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
locale_tree->set_columns(1);
locale_tree->set_hide_root(true);
locale_tree->set_column_expand(0, true);
@@ -1502,6 +1504,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
page2_2_vb->add_child(glyphs_split);
glyph_table = memnew(Tree);
+ glyph_table->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
glyph_table->set_custom_minimum_size(Size2((30 * 16 + 100) * EDSCALE, 0));
glyph_table->set_columns(17);
glyph_table->set_column_expand(0, false);
@@ -1521,6 +1524,7 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
glyph_table->connect("item_activated", callable_mp(this, &DynamicFontImportSettingsDialog::_glyph_selected));
glyph_tree = memnew(Tree);
+ glyph_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
glyph_tree->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
glyph_tree->set_columns(2);
glyph_tree->set_hide_root(true);
diff --git a/editor/input_event_configuration_dialog.cpp b/editor/input_event_configuration_dialog.cpp
index 451829163c..e2aac6c75d 100644
--- a/editor/input_event_configuration_dialog.cpp
+++ b/editor/input_event_configuration_dialog.cpp
@@ -668,6 +668,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
manual_vbox->add_child(input_list_search);
input_list_tree = memnew(Tree);
+ input_list_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
input_list_tree->set_custom_minimum_size(Size2(0, 100 * EDSCALE)); // Min height for tree
input_list_tree->connect("item_selected", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected));
input_list_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 78ceb2ef6d..c2707e3a3d 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -762,6 +762,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
container->add_child(unique_resources_label);
unique_resources_list_tree = memnew(Tree);
+ unique_resources_list_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
unique_resources_list_tree->set_hide_root(true);
unique_resources_list_tree->set_columns(1);
unique_resources_list_tree->set_column_title(0, TTR("Property"));
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index bda2cb666b..e75bb454ae 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -1252,6 +1252,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
filters = memnew(Tree);
filter_vbox->add_child(filters);
+ filters->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
filters->set_v_size_flags(SIZE_EXPAND_FILL);
filters->set_hide_root(true);
filters->connect("item_edited", callable_mp(this, &AnimationNodeBlendTreeEditor::_filter_edited));
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 2af3811863..9a7974acef 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -821,6 +821,7 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
tree = memnew(Tree);
vb->add_child(tree);
+ tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_columns(2);
tree->set_column_titles_visible(true);
tree->set_column_title(0, TTR("Resource"));
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index a1ff7fc0bf..bfac9c8cf9 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -2058,6 +2058,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
blend_editor.dialog->add_child(blend_vb);
blend_editor.tree = memnew(Tree);
+ blend_editor.tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
blend_editor.tree->set_hide_root(true);
blend_editor.tree->set_columns(2);
blend_editor.tree->set_column_expand_ratio(0, 10);
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index db6e3dd69f..f24747d903 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1809,6 +1809,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
add_child(delete_window);
delete_tree = memnew(Tree);
+ delete_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
delete_tree->set_hide_root(true);
delete_tree->connect("draw", callable_mp(this, &AnimationNodeStateMachineEditor::_delete_tree_draw));
delete_window->add_child(delete_tree);
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index d8c020eb29..e80f299f42 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -173,6 +173,7 @@ void BonePicker::create_editors() {
add_child(vbox);
bones = memnew(Tree);
+ bones->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
bones->set_select_mode(Tree::SELECT_SINGLE);
bones->set_v_size_flags(Control::SIZE_EXPAND_FILL);
bones->set_hide_root(true);
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index a624c47e3e..2e0a9c7272 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -369,6 +369,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
tree = memnew(Tree);
tree->connect("button_clicked", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
+ tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_columns(2);
tree->set_column_expand_ratio(0, 2);
tree->set_column_clip_content(0, true);
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index 13928710bb..30fb731fc8 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -216,6 +216,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
filters = memnew(Tree);
filter_dialog->add_child(filters);
+ filters->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
filters->set_v_size_flags(SIZE_EXPAND_FILL);
filters->set_hide_root(true);
filters->connect("item_activated", callable_mp(this, &EditorPropertyRootMotion::_confirmed));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 43afc6f7d5..9121ca09b4 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -423,6 +423,7 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
register_text_enter(search_box);
set_hide_on_ok(false);
search_options->connect("item_activated", callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
+ search_options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
search_options->set_hide_root(true);
search_options->set_hide_folding(true);
search_options->add_theme_constant_override("draw_guides", 1);
@@ -4167,6 +4168,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
disk_changed_list = memnew(Tree);
vbc->add_child(disk_changed_list);
+ disk_changed_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
disk_changed->connect("confirmed", callable_mp(this, &ScriptEditor::reload_scripts).bind(false));
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 882ccce501..c093f556ea 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -99,6 +99,7 @@ ConnectionInfoDialog::ConnectionInfoDialog() {
vbc->add_child(method);
tree = memnew(Tree);
+ tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tree->set_columns(3);
tree->set_hide_root(true);
tree->set_column_titles_visible(true);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index 6a66a984c0..e0c5f9e596 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -809,6 +809,7 @@ void Skeleton3DEditor::create_editors() {
bones_section->get_vbox()->add_child(s_con);
joint_tree = memnew(Tree);
+ joint_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
joint_tree->set_columns(1);
joint_tree->set_focus_mode(Control::FOCUS_NONE);
joint_tree->set_select_mode(Tree::SELECT_SINGLE);
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 8ed00cf542..0db752e771 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -918,6 +918,7 @@ ThemeItemImportTree::ThemeItemImportTree() {
add_child(import_main_hb);
import_items_tree = memnew(Tree);
+ import_items_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
import_items_tree->set_hide_root(true);
import_items_tree->set_h_size_flags(Control::SIZE_EXPAND_FILL);
import_main_hb->add_child(import_items_tree);
@@ -1928,6 +1929,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_dialog_side_vb->add_child(edit_type_label);
edit_type_list = memnew(Tree);
+ edit_type_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
edit_type_list->set_hide_root(true);
edit_type_list->set_hide_folding(true);
edit_type_list->set_columns(1);
@@ -2031,6 +2033,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
edit_items_remove_all->connect("pressed", callable_mp(this, &ThemeItemEditorDialog::_remove_all_items));
edit_items_tree = memnew(Tree);
+ edit_items_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
edit_items_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
edit_items_tree->set_hide_root(true);
edit_items_tree->set_columns(1);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index b6a4a14117..964558ee78 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -5716,6 +5716,7 @@ VisualShaderEditor::VisualShaderEditor() {
members = memnew(Tree);
members_vb->add_child(members);
SET_DRAG_FORWARDING_GCD(members, VisualShaderEditor);
+ members->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); // TODO: Implement proper translation switch.
members->set_h_size_flags(SIZE_EXPAND_FILL);
members->set_v_size_flags(SIZE_EXPAND_FILL);
members->set_hide_root(true);
@@ -5818,6 +5819,7 @@ VisualShaderEditor::VisualShaderEditor() {
varyings = memnew(Tree);
vb->add_child(varyings);
+ varyings->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
varyings->set_h_size_flags(SIZE_EXPAND_FILL);
varyings->set_v_size_flags(SIZE_EXPAND_FILL);
varyings->set_hide_root(true);
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index be5f309704..ac175d01a6 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -557,6 +557,7 @@ PropertySelector::PropertySelector() {
search_box->connect("text_changed", callable_mp(this, &PropertySelector::_text_changed));
search_box->connect("gui_input", callable_mp(this, &PropertySelector::_sbox_input));
search_options = memnew(Tree);
+ search_options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
set_ok_button_text(TTR("Open"));
get_ok_button()->set_disabled(true);