0

I am trying to write a script that re-sizes imported glb models to a fixed dimension (x/y/z = 1, whichever is the longest). The problem is that the models usually consist of many nested objects for which I can not get the absolute dimensions. I built a resizing function in Threejs but unfortunately blender doesn't seem to support giving absolute dimensions of a group of objects.

I am lost here, and would appreciate any hints towards a solution.

Max
  • 101
  • 2
  • 1
    Related https://blender.stackexchange.com/questions/47496/how-to-have-a-boundary-box-around-a-whole-group-instance (dupe but old might need rejig) https://blender.stackexchange.com/questions/63153/setting-exact-scale-dimension-on-multiple-objects-as-a-whole https://blender.stackexchange.com/questions/163352/how-do-i-get-a-proxy-object-dimensions https://blender.stackexchange.com/questions/160976/how-can-i-normalize-the-scale-of-what-seems-to-be-either-an-infinitely-large-o – batFINGER Jun 24 '20 at 11:32

1 Answers1

0

This is the process that worked for me.

I basically just select all objects of type MESH and join them. Then I remove all objects of type EMPTY that might be parented to the mesh (eventually normalising the transforms with transform_apply(location=False, rotation=True, scale=True)). From there it becomes very easy to programmatically manipulate the object.

Max
  • 101
  • 2