View Full Version : Sort Layers Alphabetically - But Then Keep That Order ?

09 September 2010, 03:04 PM
Hi, looking for some help on a script to sort layers Alphabetically : -

reorderLayers 1;

but then save the layers in that order - they default back to their original state otherwise. I know I need to utilise the setAttr based on the displayOrder once they are sorted Alphabetically, but unsure as to how go about that ?


09 September 2010, 03:32 PM
list all layers into an array. sort the array, then iterate through the array (using a $counter) and assign the displayOrder value to the $counter value...


09 September 2010, 03:39 PM
Cheers ! :D

CGTalk Moderation
09 September 2010, 03:39 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.