Fix convert_skybox.py on Linux
This commit is contained in:
parent
ca77f0aa60
commit
03d9c6a221
|
@ -44,9 +44,10 @@ if not os.path.exists(out_dir):
|
||||||
for i in range(tile_count):
|
for i in range(tile_count):
|
||||||
x_t = i % 8
|
x_t = i % 8
|
||||||
y_t = i // 8
|
y_t = i // 8
|
||||||
|
separator = "\\" if os.name == "nt" else "/"
|
||||||
in_img.crop((
|
in_img.crop((
|
||||||
img_width * x_t // 8,
|
img_width * x_t // 8,
|
||||||
img_height * y_t // 8,
|
img_height * y_t // 8,
|
||||||
int(img_width * x_t // 8 + img_width * tile_len_ratio),
|
int(img_width * x_t // 8 + img_width * tile_len_ratio),
|
||||||
int(img_height * y_t // 8 + img_height * tile_len_ratio)
|
int(img_height * y_t // 8 + img_height * tile_len_ratio)
|
||||||
)).save(f"{out_dir}\\{os.path.basename(in_fn_id).split('.')[0]}.{f'{i:02}'}.rgba16.png", "PNG", optimize=True)
|
)).save(f"{out_dir}{separator}{os.path.basename(in_fn_id).split('.')[0]}.{f'{i:02}'}.rgba16.png", "PNG", optimize=True)
|
||||||
|
|
Loading…
Reference in New Issue