0

Does anyone know of an Illustrator script that does a "Release to Layers", but renames the layers based on their group names?

I'm sure I had one ages ago, but I can't find it now...

It's very useful when importing complex AI layers to After Effects

1

2 Answers 2

1

found the non-script answer:

Select toplevel layer. select release to layers. Shift drag sublayers out the top layer.

(from 'learning illustrator')

2

I use this script from Carlos Canto. After releasing layers it will name new top level layers based on sublayer name. The link to the adobe forum is broken now so I don't think this is accessible through there anymore.

It is a little difficult to figure out how to properly select the layers to make it work. You must select all the objects and also have the top layer selected in the layers palette, like in this screenshot.

How to select layers

Thanks Carlos for making this way back in 2014!

// carlos canto // 09/26/14  
// https://forums.adobe.com/thread/287812  
var idoc = app.activeDocument;  
var ilayer = idoc.activeLayer;  
for (i=0; i<ilayer.layers.length; i++) {  
   var sublayer = ilayer.layers[i];  
   sublayer.name = sublayer.pageItems[0].name || sublayer.pageItems[0].contents;  
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.