1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Fix group layer children blending not working with nested group layers and with layer effects

This commit is contained in:
Emmanouil Papadeas 2024-08-11 01:38:18 +03:00
parent f3ee00a944
commit 9c170ee5a0
2 changed files with 4 additions and 3 deletions

View file

@ -699,7 +699,7 @@ func _blend_layers(
if layer is GroupLayer:
layer_image.copy_from(layer.blend_children(frame, Vector2i.ZERO))
else:
layer_image.copy_from(frame.cels[export_layers - 2].get_image())
layer_image.copy_from(layer.display_effects(frame.cels[export_layers - 2]))
image.blend_rect(layer_image, Rect2i(Vector2i.ZERO, project.size), origin)

View file

@ -23,18 +23,19 @@ func blend_children(frame: Frame, origin := Vector2i.ZERO) -> Image:
var layer := children[i]
if not layer.is_visible_in_hierarchy():
continue
var cel := frame.cels[layer.index]
if layer is GroupLayer:
var blended_children: Image = layer.blend_children(frame, origin)
if DisplayServer.get_name() == "headless":
image.blend_rect(blended_children, blend_rect, origin)
else:
textures.append(blended_children)
DrawingAlgos.set_layer_metadata_image(layer, cel, metadata_image, i)
else:
var cel := frame.cels[layer.index]
if DisplayServer.get_name() == "headless":
DrawingAlgos.blend_layers_headless(image, project, layer, cel, origin)
else:
textures.append(display_effects(cel))
textures.append(layer.display_effects(cel))
DrawingAlgos.set_layer_metadata_image(layer, cel, metadata_image, i)
if DisplayServer.get_name() != "headless":