Use a new Layer class to handle layer information

This replaces the old Global.layers nested array mess, and makes the code easier to read and to understand.
This commit is contained in:
OverloadedOrama 2020-06-01 16:42:53 +03:00
parent 1762383c6b
commit a9ca858303
13 changed files with 100 additions and 86 deletions

View file

@ -365,7 +365,7 @@ func blend_layers(image: Image, canvas: Canvas, origin: Vector2 = Vector2(0, 0))
image.lock()
var layer_i := 0
for layer in canvas.layers:
if Global.layers[layer_i][1]:
if Global.layers[layer_i].visible:
var layer_image := Image.new()
layer_image.copy_from(layer[0])
layer_image.lock()