Home Technical Talk

Toggletator! For Photoshop: toggle visibility of specific layers with a hotkey

polycounter lvl 10
Offline / Send Message
kritskiy polycounter lvl 10
Hey everyone,

Here's a little something I made like 20 years ago but only upload it now, behold, TOGGLETATOR  (for Photoshop CS6-CC2018).


Toggletator is a collection of 3 scripts that allow to toggle visibility of specific or active layers with hotkeys.

* Toggle a Layer: toggles visibility of layers with specific prefix



* Toggle Active Layers: toggles selected layers



* Toggle a Channel: toggles a channel with specific prefix.



More about options in the manual.

If you're interested, you can grab it at https://gum.co/toggle

Or if you have any questions I'll answer them here or you can write me to kritskiy.sergey@gmail.com or @ebanchiki on twitter

Cheers,
Sergey.

Replies

  • Elithenia
    Options
    Offline / Send Message
    Elithenia polycounter
    Wow! This is really nice :D 
  • Torch
    Options
    Offline / Send Message
    Torch interpolator
    Ooo hello, looks sweet 
  • AhmedSpunky
    Options
    Offline / Send Message
    AhmedSpunky polycounter lvl 5
    wow really helpful nice!
  • janoshx
    Options
    Offline / Send Message
    janoshx polycounter lvl 6
    Very nice!!

    Does this work on mac? If I buy one can i install it to my mac and windows machine?
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    janoshx said:
    Very nice!!

    Does this work on mac? If I buy one can i install it to my mac and windows machine?
    Sure, it works both on Mac and Win, and yes, you can install it on both machines
  • janoshx
    Options
    Offline / Send Message
    janoshx polycounter lvl 6
    kritskiy said:
    janoshx said:
    Very nice!!

    Does this work on mac? If I buy one can i install it to my mac and windows machine?
    Sure, it works both on Mac and Win, and yes, you can install it on both machines
    Then we have a deal! 
  • TooLzor
    Options
    Offline / Send Message
    TooLzor polycounter lvl 10
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    would be cool to have such tool working for  layer comps.  would be easier to manage
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    gnoop said:
    would be cool to have such tool working for  layer comps.  would be easier to manage
    Interesting, but how would that work? You can't really toggle them, only switch and only one can be active at any time. So if I have 5 layer comps, what script should do? Or what's your workflow?
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Just wanted to chime in to say that once manually installed, Toggle Layer Visibility works just fine in CS5 (I haven't tried the other two scripts since I don't have a use for them).

    As for the installer itself : it ran without error but didn't seem to create any files on my end (maybe because it didn't find a CS6/CC folder ?)

    Thanks for the handy tool. I already had a "toggle current" script and various layer related actions, but the prefix-based toggler really is great for painting under lineart.
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    As for the installer itself : it ran without error but didn't seem to create any files on my end (maybe because it didn't find a CS6/CC folder ?)
    Ah yes, it didn't create folders because it tries to look for several predefined folders in Program Files. Could you please tell me what's a folder for CS5? I'll add it to installer later. I imagine it's "Adobe Photoshop CS5" and "Adobe Photoshop CS5 (64 Bit)" (if there was a 64b version) :) but with Adobe you never know
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Hi there !

    That would be : "Adobe Photoshop CS5.1 (64 Bit)" and "Adobe Photoshop CS5.1"
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    Thanks, Pior! Didn't expect to see ".1" there :D
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    Toggletator now includes a script to toggle between two zoom levels (for Photoshop CC2015+)


  • oglu
    Options
    Offline / Send Message
    oglu polycount lvl 666
    isnt that the same like a layer comp.? 
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    in what regard?
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    I added more scripts to Toggletator, there're much more things to toggle:

    Toggle Inactive Layers Visibility;

    Toggle Layers Visibility by Labels script: it's like toggle by name, but by color label;


    Toggle Brush Blend Mode*: toggle between Normal and Erase brush blending mode with a hotkey;

    Toggle Brush Color Dynamics*: toggle brush color dynamics on/off;


    Toggle Brush Tilt*: toggle between two different ways of controlling brush angles;


    *these guys are for Photoshop CC2014 and newer

    Grab it on Gumroad: https://gumroad.com/l/toggle
  • autojive
    Options
    Offline / Send Message
    autojive polycounter lvl 10
    Thanks for making these, kritskiy. I've only just become aware of these and I've had a huge need for scripts like these.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Hey Sergey, these tools are great ! I've used your clever "hiding layer visibility" script in the past a few times, definitely a time-saver. (by that I mean : the one relying on layer name starting with "hide " to trigger the action. Really cool for painting under lineart).

    Now a question for you. One thing I've never been able to streamline in PS is the ability to unhide a specific hidden and inactive layer ... using the keyboard only. Or even all inactive hidden layers for that matter, that could be useful too. I barely ever use the cursor when navigating the layer stack in PS (since it is possible to navigate it, and move layers up and down with keyboard shortcuts only pretty easily) ; but the problem is that any inactive and hidden layer is skipped when navigating up and down the stack that way.

    Two solutions that I could think of would be : 

    1 - Either finding a way to take inactive hidden layers into account when navigating the stack (and then the user can  show said layer using a regular unhide script. I use the one by Trevor Morris called "Toggle layer visibility 1-1-0")

    2 - Or, having a script that simply iterates through the whole stack to make any hidden visible (such a bruteforce global approach which wouldn't bother me, as I personally never keep layers in hidden state in my files as that can become a mess if someone else opens up a PSD, hides/unhides a bunch of stuff, and resaves).

    Anyways - I just though I'd share this scenario as that might be something you might be interested in digging into. I actually was kinda hyped earlier because I thought you had this exact feature in this 1.3 update ("Toggle Inactive Layers Visibility") but from what I understand it seems to do the opposite, pretty much :D 

    I should also probably mention that I am using CS5 Extended ... and not interested in "upgrading" to a slower and more costly version :D

    Anyways - great little tools, thank you for your time and effort making these !
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    autojive, glad you liked them!

    pior, oh, this is interesting, I also hate this jumping over the hidden layers when going through when using Alt+[ / ] but I never thought of trying to change this behaviour. Because I made a quick script and apparently it's possible:



    In this case the layers stay hidden but I can then unhide them using a 'toggle visibility of active layers' script from Toggletator. There's one problem however. Because Photoshop is UUGHHHH it doesn't allow reconfiguring of some of the keys, including this Alt+[ / ]. So it won't be possible to simply change hotkeys from PS function to scripts without external tools like AHK.

    I see now how `Toggle Inactive` name is a bit confusing: the idea behind it was to make a better alternative of Ctrl+Clicking the eye icon to hide other layers: that'd work with several layers selected and won't break if one of the layers was manually turned visible.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Oh that's already looking great ! I suppose you're fetching the name of the above layer and jumping explicitly to that ? Looks like it's working well.

    As far as I am concerned I wouldn't mind at all using AHK to handle the mapping (although I suspect Photoshop would still see the original input ? Would have to test it.). Might even be okay with developing the habit of using something else for that action altogether, like pgup/pgdown and then using AHK to pass it to PS. And from there it's just a matter of assigning some obscure proxy shortcuts to the scripts themselves (quite a workaround !)

    Or, simply using the default/unaltered way to navigate the stack most of the time, and then using the script with an obscure shortcut to get unstuck when needed.

    BTW if you ever decide to polish this script, it'd be cool if it could behave in a smart way when reaching a layer with a layer mask - first making the layer active, and then the mask. I think there is a default/built-in way to do that in PS but I keep forgetting how to do so, somehow.

    Cool stuff.
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    I'm using indexes: names aren't very reliable (in the example above PS would be confused by a number of Layer 1 layers).

    Re the AHK: personally I use it all the time, but I imagine for 99% Photoshop users it's a bit too much. Not like I care a lot, I do those scripts for myself anyway :smiley: but using the AHK it wouldn't be a problem to remap something like Alt + [ or ] to a script file.

    Anyway, I'll finish these scripts some time later this week. Not sure about CS5, but I have CS6 and I think they mostly share script functions so I'll test them on CS6 :)

     when reaching a layer with a layer mask - first making the layer active, and then the mask.
    Don't you think this might be confusing? Anyway, because I didn't find a default way of switching between mask and layer I made a script for that, and it's a part of my free scripts pack Scriptorator: 
    https://scriptorator.readthedocs.io/en/latest/switchmask/index.html
  • kritskiy
    Options
    Offline / Send Message
    kritskiy polycounter lvl 10
    pior said:
    BTW if you ever decide to polish this script, it'd be cool if it could behave in a smart way when reaching a layer with a layer mask - first making the layer active, and then the mask. I think there is a default/built-in way to do that in PS but I keep forgetting how to do so, somehow.
    I think it's done. Thanks for the idea, I love using it! I tried it in CS6 and it worked, I wonder if it's the same for CS5. I'm attaching a zip with 3 files in there, one of them is just a library that's required for scripts to work and two other are the actual functions.
    The only limitation I noticed is that if you're using Alt+Shift+[ / ] to select layers and you go through first or last layer of the stack, my script struggles to continue selection but I don't think that's a common situation, when you need to select several layers on bottom and several on the top. Other than that it seems to work fine.


    Here's my setup in AHK:

    ![::<br>Run, "C:\Program Files\Adobe\Adobe Photoshop CC 2018\Photoshop.exe" "D:\Dropbox\PS\Scripts\go_down_through_stack.jsx"<br>return <br><br>!+[::<br>Run, "C:\Program Files\Adobe\Adobe Photoshop CC 2018\Photoshop.exe" "D:\Dropbox\PS\Scripts\go_down_through_stack.jsx"<br>return<br><br>!]::<br>Run, "C:\Program Files\Adobe\Adobe Photoshop CC 2018\Photoshop.exe" "D:\Dropbox\PS\Scripts\go_up_through_stack.jsx"<br>return<br><br>!+]::<br>Run, "C:\Program Files\Adobe\Adobe Photoshop CC 2018\Photoshop.exe" "D:\Dropbox\PS\Scripts\go_up_through_stack.jsx"<br>return<br><br>(the script detects if Shift-key is pressed to start adding to selection that's why there're both Alt+[/] and Alt+Shift+[/] are assigned to same scripts)
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Oh, that's pretty damn nice, thanks !

    Can confirm that these scripts themselves work fine here in CS5. However calling the JSXs directly from AHK doesn't seem to work for me, so maybe that's one difference between CS5 and 6 - which actually sounds quite plausible.

    At the end of the day I ended up mapping them to ctrl< ctrl>. Which is not too bad, since I would still use alt] alt[ most of the time (I don't think I can train myself out of that habit!) and then only using the scripts when stuck. And that's actually probably for the best , as the scripts seem to be just a tiny bit slower than the built-in up/down - especially since PS doesn't allow for keypress-repeat for scripts.

    To sum things up : thanks ! That's pretty damn cool and very useful. The less reaching for the mouse the better :)

    I'll try to dig up some info about mask selection.
Sign In or Register to comment.