0
$\begingroup$

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.

$\endgroup$
1
0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ This is pretty destructive approach in that all local coordinates will be lost. Materials could also be an issue. $\endgroup$ – batFINGER Jun 25 '20 at 13:31
  • $\begingroup$ Hmm, good point with the materials. $\endgroup$ – Max Jun 25 '20 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.