From 2453911013d9226365f44e81c91db36bebedf1f0 Mon Sep 17 00:00:00 2001 From: Saracen Date: Mon, 26 Aug 2024 01:27:20 +0100 Subject: [PATCH] Revert "Fix importer preview for models with scaled armatures" This reverts commit 06709e68657ad6595c8ae8603d17b62ec984539d. --- editor/import/3d/scene_import_settings.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp index e131794e84b..7cd5279b635 100644 --- a/editor/import/3d/scene_import_settings.cpp +++ b/editor/import/3d/scene_import_settings.cpp @@ -464,7 +464,14 @@ void SceneImportSettingsDialog::_fill_scene(Node *p_node, TreeItem *p_parent_ite mesh_node->add_child(collider_view, true); collider_view->set_owner(mesh_node); - AABB aabb = mesh_node->get_aabb(); + Transform3D accum_xform; + Node3D *base = mesh_node; + while (base) { + accum_xform = base->get_transform() * accum_xform; + base = Object::cast_to(base->get_parent()); + } + + AABB aabb = accum_xform.xform(mesh_node->get_mesh()->get_aabb()); if (first_aabb) { contents_aabb = aabb;