Skip to content

Commit 824e98c

Browse files
fix: visible only should work more consistently (#205)
1 parent 2c3e48f commit 824e98c

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Export Layers To Files (Fast).jsx

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

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

77
// REQUIRES:
88
// Adobe Photoshop CS2 or higher
@@ -1942,6 +1942,7 @@ function collectLayersAM(progressBarWindow) {
19421942
var currentGroup = null;
19431943
var layerSection;
19441944
var selected = 0;
1945+
19451946
for (var i = layerCount; i >= 1; --i) {
19461947
// check if it's an art layer (not a group) that can be selected
19471948
ref = new ActionReference();
@@ -1963,7 +1964,7 @@ function collectLayersAM(progressBarWindow) {
19631964
if (!isAdjustmentLayer(activeLayer)) {
19641965
var layer = { layer: activeLayer, parent: currentGroup };
19651966
var visibleMatters = ((prefs.visibleOnly && layerVisible) || !prefs.visibleOnly);
1966-
if(visibleMatters) {
1967+
if((visibleMatters && currentGroup && currentGroup.visible) || (visibleMatters && !currentGroup)) {
19671968
layers.push(layer);
19681969
}
19691970
if (layerVisible && visibleInGroup[visibleInGroup.length - 1]) {
@@ -2568,7 +2569,7 @@ function makeMainDialog() {
25682569
// DIALOG
25692570
// ======
25702571
var dialog = new Window("dialog", undefined, undefined, {closeButton: false, resizeable: true});
2571-
dialog.text = "Export Layers To Files v2.6.0";
2572+
dialog.text = "Export Layers To Files v2.7.0";
25722573
dialog.orientation = "column";
25732574
dialog.alignChildren = ["center","center"];
25742575
dialog.spacing = 5;

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2012 - 2021
3+
Copyright (c) 2012 - 2022
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

dev/dialog.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)