Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

How to merge multiple groups and keep them on their separate layers?

Community Beginner ,
Mar 07, 2018 Mar 07, 2018

Hi Guys

 

I'm sure there is a really simple way to do this but I can't find the answer anywhere!

 

When I create multiple groups on separate layers, there must be a quicker way then right clicking and individually merging each layer so they stay on their respective layers?

 

A shortcut would save so much time!!

 

Thanks

 

Screen Shot 2018-03-07 at 12.25.06.png

TOPICS
Actions and scripting
18.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 07, 2018 Mar 07, 2018

I can't help right now but move your topic to Photoshop Scripting  and ask of help r-bin​ that should be easy for him

 

function sTT(v) {return stringIDToTypeID(v)} $.level = 0

function R() {return ref = new ActionReference()} arr = []

 

function DoL(v) {R().putEnumerated(sTT(v), sTT('ordinal'), sTT('targetEnum'))}

 

function bGrnd(v) {R().putIndex(sTT('layer'), v)}

 

function SC(v) {

     return typeIDToStringID((dsc = executeActionGet(ref))

     .getEnumerationValue(sTT(lS = 'layerSection')))

...
Translate
Adobe
Enthusiast ,
Mar 07, 2018 Mar 07, 2018

You can try also, to convert it to a smart object> Layer > Smart Object > Convert to Smart Object, or just try right click at the name and Convert to Smart Object. That way you will have an embed separated PSB file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 09, 2018 May 09, 2018

Was this ever resolved? I've run into a similar issue. I'm trying to create font using the Fontself plugin, and need to merge several groups while still keeping each character/glyph on its own layer. I'm asking here because I couldn't find this topic in Photoshop Scripting

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 11, 2018 May 11, 2018

I updated my previous post. Regarding your question tell me what that Fontself plugin does and is that needed for the script you want or script can work separately, without / after that plugin. I don't understand what you mean by keeping each glyph / character on its own layer as the script I wrote for jamesc16840069 merges each group into new single layers. Explain what you exactly mean, should be group of layers merged into new layer while glyphs/characters (what are they exactly?) will be kept on separate text layers? Write step by step what you exactly want...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2020 May 29, 2020

I'm adding a new reply rather than a threaded-reply...

 

It would be helpful to show actual before/after images of the expanded layer sets/groups and the desired result.

 

It is more helpful to show an actual image than to describe it in words! Both are needed, this entire topic thread is a mystery to me!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 29, 2020 May 29, 2020

There is already solution in this thread, so what for you restart it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2020 May 29, 2020

Hi Kukurykus â€“ the solution does not work for me, so I am trying to understand the problem!

 

I created a very simple test, 2 layer groups, each group had 2 layers inside. I selected the groups and ran your code... There is no apparent result, except that the previously selected groups are now deselected? There is nothing in the history panel and no layers or groups are merged.

 

groups-layers.png

 

My best guess was that each layer group should be merged into a single layer maintaining the stacking order of the layers (CMD/CTRL E or merge group) and that the script should do this for all selected layer sets/groups... Or is it that the group should be retained and all layers inside the group are merged?

 

I know that this is an old thread from 2018 that has recently been bumped by MrCocktail in 2020, I just don't understand the requests or the solutions!

 

Photoshop CC2019 on Mac OS Mojave 10.14.6

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 29, 2020 May 29, 2020

My code stopped to work because of last year forum platform transition. It removed [i] characters.

 

Change this line:

 

sNL(); for(i = 0; i < arr.length; i++) mLN(arr)

 

to: 

 

sNL(); for(i = 0; i < arr.length; i++) mLN(arr[i])

 

Ps. I edited my original code, so that should work as well.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 29, 2020 May 29, 2020

Thank you, it works which helps me to understand the question!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 27, 2023 Nov 27, 2023

Hi Kukurykus

Thank you for some really helpfull answers. 
Is it possible to change the script, into merging art boards into seperate merged layers? 
Preferable a script that accounts for different amount of artboards if possible?

The script works smooth with groups, but fails when using artboard 😞

Thank you in advance.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 27, 2023 Nov 27, 2023
LATEST

Correction. 

It actually kind of works, but when having multiple groups inside the artboards, it messes the action up. 
So the script would need to just merge the top art boards, and dont account for the underlying groups. 

And is it possible to make it select all artboards automaticly? Right now i need to select the artboards manual, and i would like to do select ALL art boards, so i can use the final action on different template files with changing amounts of artboards. 


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines