import os
import bpy
modes=["on","off","urcooked"]
sides=['s','n','l','r']
quality=99
frame=0
cmd=os.path.dirname(os.path.abspath(__file__))
path=os.path.join(cmd,"../res/map")

for mode in modes:
	for side in sides:
		for i in range(17):
			out=os.path.abspath(f"{path}/{mode}/{side}/{i}.png")
			bpy.context.scene.frame_set(frame)
			os.makedirs(os.path.dirname(out),exist_ok=True)
			bpy.context.scene.render.filepath=out
			bpy.context.scene.render.image_settings.file_format='PNG'
			bpy.context.scene.render.image_settings.quality=quality
			bpy.ops.render.render(write_still=True)
			frame+=1