Fixed exporting PNGs

This commit is contained in:
OverloadedOrama 2020-03-06 20:56:25 +02:00
parent 2a5dfa7ea2
commit 9812a34b8b
2 changed files with 6 additions and 2 deletions

View file

@ -77,7 +77,7 @@ func save_sprite(canvas : Canvas, path : String) -> void:
for layer in canvas.layers:
var img : Image = layer[0]
img.lock()
if layer[4] < 1: # If we have layer transparency
if layer[2] < 1: # If we have layer transparency
for xx in img.get_size().x:
for yy in img.get_size().y:
var pixel_color := img.get_pixel(xx, yy)
@ -132,7 +132,7 @@ func save_spritesheet() -> void:
for layer in canvas.layers:
var img : Image = layer[0]
img.lock()
if layer[4] < 1: # If we have layer transparency
if layer[2] < 1: # If we have layer transparency
for xx in img.get_size().x:
for yy in img.get_size().y:
var pixel_color := img.get_pixel(xx, yy)