Skip navigation
ammoniaavenue
Currently Being Moderated

how can I close or open a layerset

Jun 24, 2012 6:16 PM

Tags: #close #closing #layerset

Hi,

I want to close a layerSet which is contain one or more layers in it close or open. How can I do that? please look below image.

Untitled-1.jpg

thank you.

 
Replies
  • Currently Being Moderated
    Jun 24, 2012 6:28 PM   in reply to ammoniaavenue

    So far as i know, there’s no easy way to do this from a script. You can always click the little disclosure triangles. :]

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2012 7:46 PM   in reply to ammoniaavenue

    I also don't think there is a easy way. The frist problem is there is no way for a script to know if the layerSet is open or closed by checking the layerSet properties( neither DOM or Action Manager ).

     

    To open a closed layerSet you can make one of the layers in that set the activeLayer.

     

    To close a layerSet is much more involved. You first would have to get all the layerSet properties. Then check to see if it has a channel or vector mask and if so get their setting and dupe them. Then un-group the layerSet( the layers will all be selected after ungrouping ) and group the selected layers( the new layerSet will be closed ). Then reset all of the layerSet properties and restore the masks if needled. With CS6 you also have to deal with possible layer effect.

     

    I have seen a script on PS-Scripts.com that does some of that but I think it misses some setting like layer locking, layer color, channel restrictions. It also doesn't check for vector masks nor keep the channel mask settings.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 1:21 AM   in reply to ammoniaavenue
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points