Fixed bug with ImageEffect previews and different projects

When the user switched from one project to another, which had a larger size, the preview of the ImageEffect was trying to set pixels out of bounds, only when the affect option was different than "Current cel"
This commit is contained in:
Manolis Papadeas 2020-11-16 00:56:03 +02:00
parent 9768372dcc
commit 76772d3c64
2 changed files with 6 additions and 2 deletions

View file

@ -34,6 +34,7 @@ func _ready() -> void:
func _about_to_show() -> void:
current_cel = Global.current_project.frames[Global.current_project.current_frame].cels[Global.current_project.current_layer].image
current_frame.resize(Global.current_project.size.x, Global.current_project.size.y)
current_frame.fill(Color(0, 0, 0, 0))
var frame = Global.current_project.frames[Global.current_project.current_frame]
Export.blend_layers(current_frame, frame)