Merge branch '5.5' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2023-10-16 12:07:30 +02:00
commit 9c38514824
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4

View file

@ -186,6 +186,13 @@ class ThreeMFReader(MeshReader):
if len(um_node.getAllChildren()) == 1:
# We don't want groups of one, so move the node up one "level"
child_node = um_node.getChildren()[0]
# Move all the meshes of children so that toolhandles are shown in the correct place.
if child_node.getMeshData():
extents = child_node.getMeshData().getExtents()
move_matrix = Matrix()
move_matrix.translate(-extents.center)
child_node.setMeshData(child_node.getMeshData().getTransformed(move_matrix))
child_node.translate(extents.center)
parent_transformation = um_node.getLocalTransformation()
child_transformation = child_node.getLocalTransformation()
child_node.setTransformation(parent_transformation.multiply(child_transformation))