import bpy, os, sys from mathutils import Vector d = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "..", "Assets", "Art", "Models")) for f in sorted(os.listdir(d)): if not f.endswith(".fbx"): continue bpy.ops.wm.read_factory_settings(use_empty=True) bpy.ops.import_scene.fbx(filepath=os.path.join(d, f)) bpy.context.view_layer.update() mn = Vector((1e9,)*3); mx = Vector((-1e9,)*3) names = [] mats = set() for o in bpy.context.scene.objects: names.append(o.name) if o.type == "MESH": for c in o.bound_box: w = o.matrix_world @ Vector(c) mn = Vector(map(min, mn, w)); mx = Vector(map(max, mx, w)) for m in o.data.materials: if m: mats.add(m.name) size = mx - mn print(f"{f}: size=({size.x:.2f},{size.y:.2f},{size.z:.2f}) zmin={mn.z:.2f} objs={sorted(names)} mats={sorted(mats)}")