From 19f82021b8cd7204cd30613c83a35852b85cf318 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sun, 9 Jul 2023 15:48:49 +0300 Subject: [PATCH] Fix crash on generating a palette from the current project, and non-pixel cels exist --- src/Autoload/Palettes.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Autoload/Palettes.gd b/src/Autoload/Palettes.gd index 6b869af9d..ca1c3399d 100644 --- a/src/Autoload/Palettes.gd +++ b/src/Autoload/Palettes.gd @@ -174,7 +174,7 @@ func _fill_new_palette_with_colors( match get_colors_from: GetColorsFrom.CURRENT_CEL: for cel_index in current_project.selected_cels: - var cel: PixelCel = current_project.frames[cel_index[0]].cels[cel_index[1]] + var cel = current_project.frames[cel_index[0]].cels[cel_index[1]] cels.append(cel) GetColorsFrom.CURRENT_FRAME: for cel in current_project.frames[current_project.current_frame].cels: @@ -186,7 +186,7 @@ func _fill_new_palette_with_colors( for cel in cels: var cel_image := Image.new() - cel_image.copy_from(cel.image) + cel_image.copy_from(cel.get_image()) cel_image.lock() if cel_image.is_invisible(): continue