-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender_command.py
More file actions
32 lines (24 loc) · 969 Bytes
/
render_command.py
File metadata and controls
32 lines (24 loc) · 969 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
29
30
31
32
#################################
####### SET UP FILES HERE #######
#################################
# Name of NewGRF, as it appears in file names
name = "marshall_main"
# Manifest to use
manifest = "manifest_z64"
# Is there a snow sprite?
snow = False
#################################
# NO NEED TO CHANGE STUFF BELOW #
#################################
import subprocess
manifest_path = "voxel/manifest/" + manifest + ".json"
def render(name):
input_voxel = "voxel/" + name + ".vox"
output_sprite = "src/gfx/" + name
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, stderr = subprocess.PIPE, text=True)
print(gorender.stdout)
print(gorender.stderr)
# Render sprite varients
render(name) # regular
if snow:
render(name+"_snow")