Blog

Running Mel Scripts Using Python, Maya, Python

Posted by:

There are some things that can’t be done using python directly.  For instance you can’t do anything with the HIK system in maya using just python.  There is a way around this!  You can use eval().  eval() is a special command that tells the language you are using, in this case python to read the string enclosed as a command with its arguments.

  1. import maya.mel
  2.  
  3. maya.mel.eval('hikCreateDefinition()')
  4. maya.mel.eval('select Character1')
  5. maya.mel.eval('rename GirlCharacter')

 

0
  Related Posts
  • No related posts found.

You must be logged in to post a comment.