10 lines
395 B
Python
10 lines
395 B
Python
# Strat-Positionen eines Levelskripts als JSON (fuer Marker im 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))
|