Merge pull request #96067 from SaracenOne/advanced_importer_scale_fix

Fix importer preview for models with scaled armatures.
This commit is contained in:
Rémi Verschelde 2024-08-25 20:18:46 +02:00
commit bc2d0e9f39
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -464,14 +464,8 @@ void SceneImportSettingsDialog::_fill_scene(Node *p_node, TreeItem *p_parent_ite
mesh_node->add_child(collider_view, true); mesh_node->add_child(collider_view, true);
collider_view->set_owner(mesh_node); collider_view->set_owner(mesh_node);
Transform3D accum_xform; AABB aabb = mesh_node->get_aabb();
Node3D *base = mesh_node;
while (base) {
accum_xform = base->get_transform() * accum_xform;
base = Object::cast_to<Node3D>(base->get_parent());
}
AABB aabb = accum_xform.xform(mesh_node->get_mesh()->get_aabb());
if (first_aabb) { if (first_aabb) {
contents_aabb = aabb; contents_aabb = aabb;
first_aabb = false; first_aabb = false;