import bpy,json,sys
from pathlib import Path
p=Path(sys.argv[sys.argv.index('--')+1]);bpy.ops.wm.read_factory_settings(use_empty=True)
if p.suffix=='.blend':bpy.ops.wm.open_mainfile(filepath=str(p))
elif p.suffix=='.fbx':bpy.ops.import_scene.fbx(filepath=str(p))
else:bpy.ops.import_scene.gltf(filepath=str(p))
for o in bpy.context.scene.objects:
 print('OBJECT',o.name,o.type,tuple(o.dimensions),tuple(o.location),tuple(o.rotation_euler),tuple(o.scale))
 if o.type=='ARMATURE':
  print('BONES',[(b.name,tuple(b.head_local),tuple(b.tail_local)) for b in o.data.bones])
 if o.animation_data:
  print('ANIM',o.name,'action',o.animation_data.action,'tracks',[(t.name,[(s.name,s.action.name) for s in t.strips]) for t in o.animation_data.nla_tracks])
print('ACTIONS',[(a.name,list(a.frame_range),[(s.identifier,s.target_id_type) for s in a.slots]) for a in bpy.data.actions])
print('EXPORT PROPS',[(p.identifier,[x.identifier for x in p.enum_items] if p.type=='ENUM' else p.type) for p in bpy.ops.export_scene.gltf.get_rna_type().properties if 'anim' in p.identifier or 'action' in p.identifier])
