Layer Opacity - Change alpha of each layer

Added a slider under the layer add/remove/etc buttons that changes the currently selected layer's transparency. It gets saved in .png and .pxo files, while respecting non-opaque pixels in the image too. Which means, their alpha values aren't being overwritten.
This commit is contained in:
OverloadedOrama 2019-12-24 23:51:08 +02:00
parent aa860960e2
commit ed2e757c11
7 changed files with 77 additions and 35 deletions

View file

@ -46,7 +46,7 @@ func _on_PopupMenu_id_pressed(ID : int) -> void:
sprite.lock()
var tex := ImageTexture.new()
tex.create_from_image(sprite, 0)
new_canvas.layers.append([sprite, tex, layer[2], layer[3]])
new_canvas.layers.append([sprite, tex, layer[2], layer[3], layer[4]])
Global.undos += 1
Global.undo_redo.create_action("Add Frame")