Blog

Create Null Above Object, Rename Null to Reflect Child Name – Python, Maya

Posted by:

Rename a list of objects using the selection list’s object names in the rename, add a suffix or prefix.

import maya.cmds as cmds

selectionList = cmds.ls( selection=True ) #create a list of object from your current selection

for selectionListObjects in selectionList:

null=cmds.group(empty=True)
nullName = cmds.rename(null, selectionListObjects + ‘Null’)
print newName
cmds.parent(selectionListObjects,nullName)

 

0

About the Author:

  Related Posts
  • No related posts found.

Add a Comment