Files
NiemandKG d1c3761e58 Grass Cutters Together: the project as of moon-sweepers f3666f0
A clean start for the shared repository: the Unity project (Assets, Packages, ProjectSettings), ArtSource, Docs and
Tools as they stood at f3666f0 in the old local repository, with its generated prefabs and scene brought up to date.
Images, audio, models and binaries go through Git LFS (.gitattributes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 18:44:40 +06:00

22 lines
947 B
Python

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)}")