# strat positions of a level script as JSON (for markers in the Blender render) import sys, json, os sys.path.insert(0, 'tools') import levelbuild as LB mod = LB.load_script(sys.argv[1]) L = LB.Level(LB.BASE, **getattr(mod, 'LEVEL_ARGS', {})); L.opts = {} mod.build(L) json.dump([dict(name=d['name'], x=d['x'], y=d['y'], z=d['z']) for d in L.strats], open(sys.argv[2], 'w')) print(len(L.strats))