vCycleLayersets v1.5
What it does

vCycleLayersets has two functions:

The first, as it's name suggests, is that it will cycle the visibility of any marked layersets in order. If you have 6 marked layersets called 1,2,3,4,5,6, then running the script will show Layerset 1 and hide the rest, running it again will hide all but Layerset 2, and so on.

The second function sets an image up for use with both this and vSavePSDTGA's sets feature, with a few assumptions.

Getting Started

Before running vCycleLayersets you must have an image open. If your image has only 1 layer then the script will "prep" it, if it has marked root layersets it will "cycle" it. If you have more than 1 layer but no marked sets then nothing will happen.

Once you have an image you can run the script from Photoshop's File/Scripts menu. You can also set up a keyboard shortcut for the script through the Edit/Keyboard Shortcuts... menu, and this is recommended in most cases.

Modes

Prep mode

Prepping is the action the script will perform if you run it on an image with only one layer. The script assumes that the image is a UVW layout map, and sets the image up in a standard way. This may not be what you want - so in case the script is run by accident on a flattened image it will check that you mean to continue.

To the left are the resulting Layersets after running the script:

The folders "Diffuse", "Specular" and "Normal" are marked, and contain no further layers, while UV's is unmarked and contains the original image twice - both set to the screen blending mode, with the first having an opacity of 100%, and the second having an opacity of 8%.

The background image is actually the same image you ran the script on, unchanged.

Now, with the UV's set visible, any layers added to the other layersets will have the UV's visible upon them, even when cycle layersets is run. To hide the UV's, simply turn off that sets visibility.

Cycle Mode

Cycle mode simply cycles the visibility of the root layersets marked with a ~ (Tilde). Unlike vSavePSDTGA you cannot change the marker for vCyclelayersets, it must always be a ~ for the script to function.

So, in the image shown above, running the script would select the Diffuse layerset, and hide the Specular and Normal layerset. Running it a second time would hide the Diffuse layerset and reveal/select the Specular one. Once the top is reached the visibility will cycle back down to Diffuse.

If more than one marked layer is visible the script will always default to showing the lowest one. So if Normal and Specualr were visible, and diffuse hidden then running the script would hide Normal and Specular and Reveal and select Diffuse.

 

 
 
 

 

vTools © James A. Taylor 2007