From 53e4ebc668bb5394d02ec61b6b884672807af673 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:50:50 +0300 Subject: [PATCH] Fix spritesheet exporting from bug introduced in 6fa4a2758986db2f7eff899c4723cced5074a9bd --- src/Autoload/Export.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Autoload/Export.gd b/src/Autoload/Export.gd index 3e26922b2..7e41ced8b 100644 --- a/src/Autoload/Export.gd +++ b/src/Autoload/Export.gd @@ -643,13 +643,14 @@ func _blend_layers( # "Include blended" must be toggled on when saving the pxo file # in order for this to work. var image_data := zip_reader.read_file(image_path) - image.set_data( - image.get_width(), - image.get_height(), + var loaded_image := Image.create_from_data( + project.size.x, + project.size.y, image.has_mipmaps(), image.get_format(), image_data ) + image.blend_rect(loaded_image, Rect2i(Vector2i.ZERO, project.size), origin) else: load_result_from_pxo = false zip_reader.close()