import bpy,sys,os,json from pathlib import Path p=Path(sys.argv[-1]); bpy.ops.wm.open_mainfile(filepath='') if False else None # importer each fbx for f in [p/'BudBud_Rigged.fbx', Path('AIClient/Assets/Bundles/Characters/Animal/BudBud/BudBud.fbx')]+[p/'motions'/n/'animated.fbx' for n in ('Idle','Walk','Attack')]: bpy.ops.wm.read_factory_settings(use_empty=True) bpy.ops.import_scene.fbx(filepath=str(f),use_anim=True) objs=list(bpy.context.scene.objects); tris=0; bones=[]; acts=[] for o in objs: if o.type=='MESH': tris += sum(len(poly.vertices)-2 for poly in o.data.polygons) if o.type=='ARMATURE': bones += [b.name for b in o.data.bones] print(f.name,'objects',len(objs),'tris',tris,'bones',len(bones),'bone_names',bones[:10]) print('actions',[(a.name,a.frame_start,a.frame_end) for a in bpy.data.actions])