Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Move group(s) into a group

$
0
0

I want to write a function to grouping selected layers and groups into a new group.

It works fine with layers, but with groups I get an error "Illegal argument".

 

In a document with just two groups (and the background layer) this code doesn't works and I dont know why :S

 

// I want move "Group 1" into "Group 2"
var g1 = app.activeDocument.layers.getByName("Group 1");
var g2 = app.activeDocument.layers.getByName("Group 2");
g1.move(g2, ElementPlacement.INSIDE);

 

Thanks in advanced


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>