1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 09:39:48 +00:00
Pixelorama/src/UI/CanvasPreview.gd
OverloadedOrama 047561b95a Added options for when importing an image as a new frame or layer
The user can now choose which layer they want the new frame to be, and, similarly, which frame they want the new layer to be when importing an image.
2020-06-22 15:57:42 +03:00

14 lines
494 B
GDScript

extends Node2D
func _draw() -> void:
var current_project : Project = Global.current_project
var frame : int = current_project.current_frame
var current_cels : Array = current_project.frames[frame].cels
# Draw current frame layers
for i in range(current_cels.size()):
var modulate_color := Color(1, 1, 1, current_cels[i].opacity)
if i < current_project.layers.size() and current_project.layers[i].visible:
draw_texture(current_cels[i].image_texture, Vector2.ZERO, modulate_color)