Created
January 24, 2023 15:49
-
-
Save bohdon/b04ebbe55fe464b9d342b12d4c73e730 to your computer and use it in GitHub Desktop.
Sort the selected Maya nodes by name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
def sort_by_name(nodes): | |
# get sorted list of nodes | |
sorted_nodes = sorted(nodes) | |
for node in sorted_nodes: | |
pm.reorder(node, back=True) | |
sort_by_name(pm.selected()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment