Added UndoRedo support for importing images as frames and layers

This commit is contained in:
OverloadedOrama 2020-06-21 21:39:16 +03:00
parent 40a01f1da3
commit 76b7014d84
2 changed files with 33 additions and 9 deletions

View file

@ -9,5 +9,5 @@ func _draw() -> void:
# Draw current frame layers
for i in range(current_cels.size()):
var modulate_color := Color(1, 1, 1, current_cels[i].opacity)
if current_project.layers[i].visible: # if it's visible
if i < current_project.layers.size() and current_project.layers[i].visible: # if it's visible
draw_texture(current_cels[i].image_texture, Vector2.ZERO, modulate_color)