Skip to content

Commit 40492ed

Browse files
fix: now properly exports all layers again (#212)
1 parent cc2ba50 commit 40492ed

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Export Layers To Files (Fast).jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Export Layers To Files
33

44
// VERSION:
5-
// v2.7.0
5+
// v2.7.1
66

77
// REQUIRES:
88
// Adobe Photoshop CS2 or higher
@@ -1963,14 +1963,17 @@ function collectLayersAM(progressBarWindow) {
19631963
if (layerSection == "layerSectionContent") {
19641964
if (!isAdjustmentLayer(activeLayer)) {
19651965
var layer = { layer: activeLayer, parent: currentGroup };
1966-
var visibleMatters = ((prefs.visibleOnly && layerVisible) || !prefs.visibleOnly);
1967-
if((visibleMatters && currentGroup && currentGroup.visible) || (visibleMatters && !currentGroup)) {
1966+
var isLayerVisible = prefs.visibleOnly && layerVisible
1967+
var isGroupVisible = isLayerVisible && currentGroup && currentGroup.visible;
1968+
var noGroupJustLayer = isLayerVisible && !currentGroup;
1969+
var exportAll = !prefs.visibleOnly;
1970+
if(isGroupVisible || noGroupJustLayer || exportAll) {
19681971
layers.push(layer);
19691972
}
19701973
if (layerVisible && visibleInGroup[visibleInGroup.length - 1]) {
19711974
visibleLayers.push(layer);
19721975
}
1973-
if (selected > 0 && visibleMatters) {
1976+
if (selected > 0 && (isLayerVisible || exportAll)) {
19741977
selectedLayers.push(layer);
19751978
}
19761979
if (currentGroup) {
@@ -2569,7 +2572,7 @@ function makeMainDialog() {
25692572
// DIALOG
25702573
// ======
25712574
var dialog = new Window("dialog", undefined, undefined, {closeButton: false, resizeable: true});
2572-
dialog.text = "Export Layers To Files v2.7.0";
2575+
dialog.text = "Export Layers To Files v2.7.1";
25732576
dialog.orientation = "column";
25742577
dialog.alignChildren = ["center","center"];
25752578
dialog.spacing = 5;

0 commit comments

Comments
 (0)