mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-07-14 22:44:43 -04:00
Made a Frame class, no longer use multiple Canvases for multiple frames
The Canvas is now single node, instead of having multiple canvases for each frame. This should also be a performance optimization, since there are less canvas nodes, so there are less _input() calls. It should also fix a rare Undo/Redo issue with motion drawing and making lines. Could be unstable, needs more testing. As a side effect, the guides are now the same for all frames, so this should also close #246.
This commit is contained in:
parent
d8136a3e17
commit
54b628f6cb
17 changed files with 412 additions and 459 deletions
|
@ -27,7 +27,7 @@ func _process(_delta : float) -> void:
|
|||
var start_pos := polygon[0]
|
||||
var end_pos := polygon[2]
|
||||
var current_layer_index : int = Global.current_layer
|
||||
var layer : Image = Global.canvas.layers[current_layer_index].image
|
||||
var layer : Image = Global.frames[Global.current_frame].cels[current_layer_index].image
|
||||
|
||||
if end_pos == start_pos:
|
||||
visible = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue