Skip to content

Commit

Permalink
fix: visible only should work more consistently (antipalindrome#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
antipalindrome committed Sep 25, 2022
1 parent 2c3e48f commit 824e98c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Export Layers To Files (Fast).jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Export Layers To Files

// VERSION:
// v2.6.0
// v2.7.0

// REQUIRES:
// Adobe Photoshop CS2 or higher
Expand Down Expand Up @@ -1942,6 +1942,7 @@ function collectLayersAM(progressBarWindow) {
var currentGroup = null;
var layerSection;
var selected = 0;

for (var i = layerCount; i >= 1; --i) {
// check if it's an art layer (not a group) that can be selected
ref = new ActionReference();
Expand All @@ -1963,7 +1964,7 @@ function collectLayersAM(progressBarWindow) {
if (!isAdjustmentLayer(activeLayer)) {
var layer = { layer: activeLayer, parent: currentGroup };
var visibleMatters = ((prefs.visibleOnly && layerVisible) || !prefs.visibleOnly);
if(visibleMatters) {
if((visibleMatters && currentGroup && currentGroup.visible) || (visibleMatters && !currentGroup)) {
layers.push(layer);
}
if (layerVisible && visibleInGroup[visibleInGroup.length - 1]) {
Expand Down Expand Up @@ -2568,7 +2569,7 @@ function makeMainDialog() {
// DIALOG
// ======
var dialog = new Window("dialog", undefined, undefined, {closeButton: false, resizeable: true});
dialog.text = "Export Layers To Files v2.6.0";
dialog.text = "Export Layers To Files v2.7.0";
dialog.orientation = "column";
dialog.alignChildren = ["center","center"];
dialog.spacing = 5;
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2012 - 2021
Copyright (c) 2012 - 2022

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions dev/dialog.js

Large diffs are not rendered by default.

0 comments on commit 824e98c

Please sign in to comment.