def NamespaceClean():
# Get a list of bones
boneList = cmds.ls(type = 'joint')
# Loop
for bone in boneList:
# Check if it has a namespace
if bone.find(":") > -1:
# We got one, prepare to clean
resultSplit = bone.split(":")
# Get the last one
newName = resultSplit[len(resultSplit)-1]
# Rename it
try:
# Do it
cmds.rename(bone, newName)
except:
# Continue
pass
评论列表
文章目录