From 65051f0910bffd714293613489aef8d6d36640c1 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:33:20 +0300 Subject: [PATCH] Bring back the image_changed setter of the Cel class Caused issues when importing files --- src/Classes/Cel.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Classes/Cel.gd b/src/Classes/Cel.gd index 46786dc39..aa6e67186 100644 --- a/src/Classes/Cel.gd +++ b/src/Classes/Cel.gd @@ -4,7 +4,7 @@ class_name Cel extends Reference # The "image" variable is where the image data of each cel are. -var image : Image +var image : Image setget image_changed var image_texture : ImageTexture var opacity : float @@ -16,3 +16,9 @@ func _init(_image := Image.new(), _opacity := 1.0, _image_texture : ImageTexture image_texture = ImageTexture.new() image = _image opacity = _opacity + + +func image_changed(value : Image) -> void: + image = value + if !image.is_empty(): + image_texture.create_from_image(image, 0)