Skip to main content
andreasf
Inspiring
September 29, 2015
Question

Move locked layers to separate documents (and then bring them back with another script)

  • September 29, 2015
  • 1 reply
  • 261 views

May be asking for much, but I have quite a complicated workflow setup to make it super-easy for non-photoshoppers to make outstanding image adjustments.

I am not super in to scripting so any help in following appriciated (if even possible)

1. Move all locked layers to separate files (best would be to preserve layer names to new document)

2. Another script that brings back the locked layers to the document.

I have given the layers names by setting a "#" character before each name. Thought that could help to identify open documents that should be brought back.

Any suggestions or guideways to bring this to life?

Thanks!

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
September 29, 2015

I don’t seem to understand the benefits of the procedure you propose but the function "getLayersIndexAndID" I posted in

Flatten all layers including background (but not locked layers)

can be used to determine Layers that are locked in any way and one could use that to duplicate them to another file/delete them in the current file.

But it might be more efficient to simply duplicate the whole image and remove the unlinked Layers – though that would depend on the numbers of Layers locked and unlocked, I guess.

Why do you want to involve a separate file, could a Group not work as a temporary "hiding place" for selected/marked/… Layers?

andreasf
andreasfAuthor
Inspiring
September 29, 2015

The workflow is hard to explain in text, so I made it in images. Here is a link:

Dropbox - - FLOW.pdf

andreasf
andreasfAuthor
Inspiring
October 1, 2015

Would it be easier to make two scripts:

SCRIPT 1: Move the selected layer to a new file with same name as layer (Name starts with ""#" example "#Layername1"

SCRIPT 2: Find any open documents with name beginning with "#". Move to current document in layer-panel.