Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Export Using A Master Layer? #7

Closed
arturinom opened this issue May 15, 2014 · 1 comment
Closed

How to Export Using A Master Layer? #7

arturinom opened this issue May 15, 2014 · 1 comment

Comments

@arturinom
Copy link

Hi,

Is there a way to export 100 layers using a specific master layer as the background?
Can i "tag" a layer to keep constant in the export process?

thanks!

@arturinom
Copy link
Author

ok i figured it out. just added this line to here:

function saveLayers(ref) {
var len = ref.layers.length;
// rename layers top to bottom
for (var i = 0; i < len; i++) {
var layer = ref.layers[i];
if (layer.typename == 'LayerSet') {
// recurse if current layer is a group
hideLayers(layer);
saveLayers(layer);
} else {
// otherwise make sure the layer is visible and save it
layer.visible = true;

// THIS IS THE NEW MASTER BACKGROUND LAYER -- comment this line if u dont want to see that layer compiled in the jpgs
activeDocument.backgroundLayer.visible = true;

saveImage(layer.name);

 layer.visible = false;
    }
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant