cwisbg

RenameUtil

Oct 8th, 2019
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # RenameUtil
  2. # cwisbg.com
  3. from pymel.core import *
  4. sl = selected()
  5. for s in sl:
  6. objType = s.getShape().type()
  7. if objType == "mesh" and s[:4] != "geo_":
  8. print "Renaming ",s," to:","geo_"+s.split("|")[-1]
  9. newName = "geo_"+s.split("|")[-1]
  10. rename(s, newName)
Advertisement
Add Comment
Please, Sign In to add comment