-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrender_command.py
More file actions
28 lines (20 loc) · 891 Bytes
/
render_command.py
File metadata and controls
28 lines (20 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#################################
####### SET UP FILES HERE #######
#################################
# Name of NewGRF, as it appears in file names
vehicle_name = "stog_4_sb"
vehicle_manifest = "4_standard"
#################################
# NO NEED TO CHANGE STUFF BELOW #
#################################
import subprocess
import shutil
import os
input_voxel = "voxel/" + vehicle_name + ".vox"
manifest_path = "voxel/manifest/" + vehicle_manifest + ".json"
output_sprite = "src/gfx/" + vehicle_name
output_sprite_path = output_sprite + "_8bpp.png"
if os.path.exists(output_sprite_path):
os.remove(output_sprite_path)
gorender = subprocess.run(["C:/tools/gorender/renderobject.exe", "-input", input_voxel, "-m", manifest_path, "-output", output_sprite, "-8", "-palette", "C:/tools/gorender/files/ttd_palette.json"], stdout = subprocess.PIPE, text=True)
print(gorender.stdout)