diff --git a/Assets/Graphics/Canvas_split.png b/Assets/Graphics/Canvas_split.png deleted file mode 100644 index b6e0c987e..000000000 Binary files a/Assets/Graphics/Canvas_split.png and /dev/null differ diff --git a/Assets/Graphics/Canvas_split.png.import b/Assets/Graphics/Canvas_split.png.import deleted file mode 100644 index 7b0e2bdee..000000000 --- a/Assets/Graphics/Canvas_split.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/Canvas_split.png-5508e200bf1cdd5667f0f6bb5fb97913.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Assets/Graphics/Canvas_split.png" -dest_files=[ "res://.import/Canvas_split.png-5508e200bf1cdd5667f0f6bb5fb97913.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=false -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/Assets/Graphics/Canvas_unsplit.png b/Assets/Graphics/Canvas_unsplit.png deleted file mode 100644 index 8e2a7a1cd..000000000 Binary files a/Assets/Graphics/Canvas_unsplit.png and /dev/null differ diff --git a/Assets/Graphics/Canvas_unsplit.png.import b/Assets/Graphics/Canvas_unsplit.png.import deleted file mode 100644 index 71668186b..000000000 --- a/Assets/Graphics/Canvas_unsplit.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/Canvas_unsplit.png-26c4de7c36c0d167fcb3541bbe59e403.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://Assets/Graphics/Canvas_unsplit.png" -dest_files=[ "res://.import/Canvas_unsplit.png-26c4de7c36c0d167fcb3541bbe59e403.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=false -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/Scripts/Main.gd b/Scripts/Main.gd index e2ca454ba..aaa95816f 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -689,10 +689,17 @@ func _on_MergeLayer_pressed() -> void: var new_layers: Array = Global.canvas.layers.duplicate() new_layers.remove(Global.canvas.current_layer_index) var selected_layer = Global.canvas.layers[Global.canvas.current_layer_index][0] + if Global.canvas.layers[Global.canvas.current_layer_index][4] < 1: # If we have layer transparency + for xx in selected_layer.get_size().x: + for yy in selected_layer.get_size().y: + var pixel_color : Color = selected_layer.get_pixel(xx, yy) + var alpha : float = pixel_color.a * Global.canvas.layers[Global.canvas.current_layer_index][4] + selected_layer.set_pixel(xx, yy, Color(pixel_color.r, pixel_color.g, pixel_color.b, alpha)) var new_layer := Image.new() new_layer.copy_from(Global.canvas.layers[Global.canvas.current_layer_index - 1][0]) new_layer.lock() + Global.canvas.blend_rect(new_layer, selected_layer, Rect2(Global.canvas.position, Global.canvas.size), Vector2.ZERO) Global.undos += 1