Sort Layers Alphabetically - But Then Keep That Order ?


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 ?



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…



Cheers ! :smiley:


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.