+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    GPS
    GPS is offline
    Junior Member
    Join Date
    Jun 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is this possible? Layer toggle with a twist?

    Hi,

    As a beginning PS painter, I am looking for a script or action that will toggle the top layer visibility on/off, and when it toggles off, return me to the later I started from.

    If it makes it simpler, this could be the layer right below the top layer.

    This would all be done with the push of a single key.

    Thanks in advance if this is possible!

  2. #2
    Power User
    Join Date
    Sep 2010
    Location
    Southern, Illinois
    Posts
    391
    Thanks
    11
    Thanked 38 Times in 37 Posts

    Re: Is this possible? Layer toggle with a twist?

    If you want to view the original layer hold the alt key on pc or option on mac and click the eye icon on the layer that you want to view. When finished just click it again while holding the alt/option key to view all the layer that were previously visible. I think this will get you the result you desire, but I'm not entirely sure what your asking.
    Last edited by Stric9; 07-21-2011 at 08:54 AM.

  3. #3
    GPS
    GPS is offline
    Junior Member
    Join Date
    Jun 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is this possible? Layer toggle with a twist?

    Hi Stric,

    That's a nice tip (thanks), but it doesn't get me what I am after: If I have to move my hand all the way over to the layers tab every time I want to turn on and off the layer, I may as well just use the eye icon for the top layer without alt.

    What I am after is a way to have an overlay of sorts appear and disappear at will as I lay down paint strokes. I don't want to have to move my pen off what I am painting while I am turning the layer on and off - instead, with my left hand, I want to do this with a keyboard shortcut.

    I hope that makes the question clearer.
    Last edited by GPS; 07-21-2011 at 09:21 AM.

  4. #4
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    208
    Thanks
    0
    Thanked 39 Times in 34 Posts

    Re: Is this possible? Layer toggle with a twist?

    This might be what you are after....
    Code:
    activeDocument.layers[0].visible = !activeDocument.layers[0].visible;

  5. #5
    GPS
    GPS is offline
    Junior Member
    Join Date
    Jun 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is this possible? Layer toggle with a twist?

    Hello Paul,

    That looks quite logical. Unfortunately for me, I have not a clue how to get that script (or any script) into Photoshop.
    Could you please educate me on how I can make that show up (and connect it to a key - say F2) in Photoshop CS5?

    Many thanks, and sorry for the newbie question.

  6. #6
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    208
    Thanks
    0
    Thanked 39 Times in 34 Posts

    Re: Is this possible? Layer toggle with a twist?

    Copy and paste the code into ExtendScript Toolkit.
    This utility can be found:-
    PC: C:\Program Files\Adobe\Adobe Utilities
    MAC: <hard drive>/Applications/Utilities/Adobe Utilities
    Save the script to the following folder:-
    PC: C:\Program Files\Adobe\Adobe Photoshop CS5\Presets\Scripts
    MAC: <hard drive>/Applications/Adobe Photoshop CS5/Presets/Scripts
    N.B. if your are using Vista or Windows 7 you will need to save the script elsewhere and then copy it to the relevant folder, this is due to permissions.
    If Photoshop was open close and restart it so that it can pick up the new script.
    To assign an action and function key, start recording a new action, assign the function key you require, then from the action palette fly-out menu select "Insert Menu Item" now File - Scripts and select your new script. Stop the recording.
    Now every time you press the function key it will run the script.
    Hope this helps.

  7. #7
    GPS
    GPS is offline
    Junior Member
    Join Date
    Jun 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is this possible? Layer toggle with a twist?

    Awesome Paul! I am indebted to you.

    I will try this as soon as I get a chance (duties call at the moment) and post back.

  8. #8
    GPS
    GPS is offline
    Junior Member
    Join Date
    Jun 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Is this possible? Layer toggle with a twist?

    Thank you again, it worked! A few notes:

    My toolkit is in: C:\Program Files (x86)\Adobe\Adobe Utilities - CS5\ExtendScript Toolkit CS5

    My scripts were in: C:\Users\<my name>\Documents\Adobe Scripts

    And - I had to delete the line about Insert Menu Item, leaving your script which I pointed to from the file menu. (Had an error with it in).

    Anyway, awesome fast answers! Thanks so much!

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.9
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.
All times are GMT -5. The time now is 09:12 AM.
vBulletin Skins