Photoshop: How do I create a separate group for every selected layer?

  • 1
  • Question
  • Updated 1 month ago
  • Answered
  • (Edited)
I need to put each layer in my Photoshop document into its own group. 

Ideally I'd select all my layers and have a command or action that puts them each into their own respective groups that have the same names as the layers themselves. CTRL G just works for creating one single group and names it "Group #". 

I work as a compositor in animation. For every background in every scene I have up to thirty layers. These all need to be imported into Toon Boom, but Toon Boom only imports a group as a separate layer (in other words, if I have 10 layers but no groups in my PSD file, Toon Boom will merge those ten layers into one). 

Naming and organizing layers accurately is extremely important for compositing. So if anyone has a script for this or has any brilliant ideas on how to do it faster than manually, it would make a huge difference and my thanks would be most eloquently typed in this conversation! :D
Photo of Witte Van Der Tempel

Witte Van Der Tempel

  • 8 Posts
  • 4 Reply Likes

Posted 6 months ago

  • 1
Photo of Max Johnson

Max Johnson, Champion

  • 493 Posts
  • 239 Reply Likes
Short of writing a script to do it, you can record actions that use the "Select next/previous layer" hotkey instead of directly selecting a layer using your mouse and they will be repeatable on any set of layers... So

  1. select the bottom most layer
  2. start recording a new action and give it a hotkey like F6 in the dialog box that appears.
  3. Start recording
  4. ctrl/cmd-g (new group)
  5. alt/opt-] (select previous layer)
  6. stop recording
Now you should have an action that, when you start at the bottom layer, will let you just mash the F6 key 30 times.
Photo of Paul Riggott

Paul Riggott

  • 359 Posts
  • 143 Reply Likes
You could see if this script will work for you Photoshop CC 2018 required and it does all layers.
www.ps-bridge-scripts.talktalk.net/download/groupsFromLayers.zip

Good luck.
Photo of Kukurykus

Kukurykus

  • 483 Posts
  • 105 Reply Likes
Try Group Selected Layers script / Also send a message to Kukrykus if you'd like to personalize it.
(Edited)
Photo of Mark Boszko

Mark Boszko

  • 3 Posts
  • 2 Reply Likes
@Kukurykus Thanks! That worked great.
Photo of Kukurykus

Kukurykus

  • 483 Posts
  • 105 Reply Likes
What is your name on regular Adobe Photoshop forum?
Photo of Mark Boszko

Mark Boszko

  • 3 Posts
  • 2 Reply Likes
Same as here?
Photo of Kukurykus

Kukurykus

  • 483 Posts
  • 105 Reply Likes
I can't find you, probably because you have no any post over there right? There is no match for the name you use here, but you can send me a message to Kukrykus by that forum so I can answer (as here private messages are disallowed for some reason).
(Edited)
Photo of Witte Van Der Tempel

Witte Van Der Tempel

  • 8 Posts
  • 4 Reply Likes
Dear Gentlemen,
As promised I will now proceed to express my gratitude with the utmost eloquence. You have both assisted a total stranger. I will remember this when we feast together in Valhalla and share our tales of victory. Your valor shines like a light brighter than Thor's lightning! 
Hahaha no but seriously this gives me something I can use and has given me some handy insights into actions! Thank you for your help and your clear communication :-)
Photo of Paul Riggott

Paul Riggott

  • 359 Posts
  • 143 Reply Likes
Please pass the scripts on to your  Toon Boom Pals if you think they may be of use.
Photo of Witte Van Der Tempel

Witte Van Der Tempel

  • 8 Posts
  • 4 Reply Likes
I totally will! I'll try to put it up on the Toon Boom Forum! I can't believe nobody else has asked for this yet...