|
2 | 2 | // Export Layers To Files |
3 | 3 |
|
4 | 4 | // VERSION: |
5 | | -// v2.7.0 |
| 5 | +// v2.7.1 |
6 | 6 |
|
7 | 7 | // REQUIRES: |
8 | 8 | // Adobe Photoshop CS2 or higher |
@@ -1963,14 +1963,17 @@ function collectLayersAM(progressBarWindow) { |
1963 | 1963 | if (layerSection == "layerSectionContent") { |
1964 | 1964 | if (!isAdjustmentLayer(activeLayer)) { |
1965 | 1965 | 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) { |
1968 | 1971 | layers.push(layer); |
1969 | 1972 | } |
1970 | 1973 | if (layerVisible && visibleInGroup[visibleInGroup.length - 1]) { |
1971 | 1974 | visibleLayers.push(layer); |
1972 | 1975 | } |
1973 | | - if (selected > 0 && visibleMatters) { |
| 1976 | + if (selected > 0 && (isLayerVisible || exportAll)) { |
1974 | 1977 | selectedLayers.push(layer); |
1975 | 1978 | } |
1976 | 1979 | if (currentGroup) { |
@@ -2569,7 +2572,7 @@ function makeMainDialog() { |
2569 | 2572 | // DIALOG |
2570 | 2573 | // ====== |
2571 | 2574 | 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"; |
2573 | 2576 | dialog.orientation = "column"; |
2574 | 2577 | dialog.alignChildren = ["center","center"]; |
2575 | 2578 | dialog.spacing = 5; |
|
0 commit comments