mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix exporting selected layers not including the non-selected frames
Backport from 55df23e400
.
This commit is contained in:
parent
1caa2c647e
commit
324e21776d
|
@ -30,6 +30,7 @@ Built using Godot 3.5.2
|
|||
- Optimize canvas drawing by only updating it when the image(s) have changed. [ac6a4db43d9296ebc03e639d8199dd3878a25d86](https://github.com/Orama-Interactive/Pixelorama/commit/ac6a4db43d9296ebc03e639d8199dd3878a25d86)
|
||||
- Fix bug where using shortcuts to switch between frames also moved the selection, causing deletions.
|
||||
- Pxo files can now be loaded from the Open menu option in the Web version. [3dcc51705a999145e53a8e6d4de217dc03b0f147](https://github.com/Orama-Interactive/Pixelorama/commit/3dcc51705a999145e53a8e6d4de217dc03b0f147)
|
||||
- Fixed exporting selected layers not including the non-selected frames.
|
||||
- The ellipse tool no longer produces gaps with large sizes. [4f3a7a305a264e0d2fe86c201af76eca4b2fea0a](https://github.com/Orama-Interactive/Pixelorama/commit/4f3a7a305a264e0d2fe86c201af76eca4b2fea0a)
|
||||
- Fix "visible layers" option on the export dialog producing wrong results. [346d1f071a8c6b1defb1072d39aea9c642f1ef59](https://github.com/Orama-Interactive/Pixelorama/commit/346d1f071a8c6b1defb1072d39aea9c642f1ef59)
|
||||
- Random brushes now work again. [1317e40ffa5e9f01a9d214221bb5133db20a1de9](https://github.com/Orama-Interactive/Pixelorama/commit/1317e40ffa5e9f01a9d214221bb5133db20a1de9)
|
||||
|
|
|
@ -343,7 +343,7 @@ config/icon="res://assets/graphics/icons/icon.png"
|
|||
config/macos_native_icon="res://assets/graphics/icons/icon.icns"
|
||||
config/windows_native_icon="res://assets/graphics/icons/icon.ico"
|
||||
config/custom_user_dir_name.X11="pixelorama"
|
||||
config/Version="v0.11.4-rc2"
|
||||
config/Version="v0.11.4-rc3"
|
||||
config/ExtensionsAPI_Version=3
|
||||
config/Pxo_Version=2
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ func blend_layers(
|
|||
if export_layers == 0:
|
||||
blend_all_layers(image, frame, origin, project)
|
||||
elif export_layers == 1:
|
||||
blend_selected_cels(image, frame, origin, project)
|
||||
blend_selected_cels(image, frame, origin, project, true)
|
||||
else:
|
||||
var layer: BaseLayer = project.layers[export_layers - 2]
|
||||
var layer_image := Image.new()
|
||||
|
@ -482,12 +482,25 @@ func blend_all_layers(
|
|||
|
||||
# Blends selected cels of the given frame into passed image starting from the origin position
|
||||
func blend_selected_cels(
|
||||
image: Image, frame: Frame, origin := Vector2(0, 0), project := Global.current_project
|
||||
image: Image,
|
||||
frame: Frame,
|
||||
origin := Vector2.ZERO,
|
||||
project := Global.current_project,
|
||||
include_layers := false
|
||||
) -> void:
|
||||
for cel_ind in frame.cels.size():
|
||||
var test_array := [project.frames.find(frame), cel_ind]
|
||||
if not test_array in project.selected_cels:
|
||||
continue
|
||||
if include_layers:
|
||||
var layer_is_selected := false
|
||||
for selected_cel in project.selected_cels:
|
||||
if cel_ind == selected_cel[1]:
|
||||
layer_is_selected = true
|
||||
break
|
||||
if not layer_is_selected:
|
||||
continue
|
||||
else:
|
||||
var test_array := [project.frames.find(frame), cel_ind]
|
||||
if not test_array in project.selected_cels:
|
||||
continue
|
||||
if frame.cels[cel_ind] is GroupCel:
|
||||
continue
|
||||
if not project.layers[cel_ind].is_visible_in_hierarchy():
|
||||
|
|
Loading…
Reference in a new issue