Skip to content

Commit

Permalink
Fix #541
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Sep 22, 2021
1 parent ad37c67 commit 8f115a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/UI/Timeline/AnimationTimeline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,14 @@ func _on_MergeDownLayer_pressed() -> void:
var selected_layer := Image.new()
selected_layer.copy_from(new_cels[Global.current_project.current_layer].image)

selected_layer.lock()
if f.cels[Global.current_project.current_layer].opacity < 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 * f.cels[Global.current_project.current_layer].opacity
selected_layer.set_pixel(xx, yy, Color(pixel_color.r, pixel_color.g, pixel_color.b, alpha))
selected_layer.unlock()

var new_layer := Image.new()
new_layer.copy_from(f.cels[Global.current_project.current_layer - 1].image)
Expand Down

0 comments on commit 8f115a7

Please sign in to comment.