Easily Translate MEL Commands to Python

Maya MEL to Python translator

Maya Embedded Language. If you script in Maya, you are probably staunchly entrenched in one of two camps — MEL or Python. Having an application that is run by an underlying embedded language, opens it up, wide. If there is a tool that you need, you can easily script one. If there is a repetitive task that you want to make simpler, you can just script that. If you are not familiar with how Maya works, everything that Maya does, really uses the embedded language (Maya Embedded Language).

The thing is, Maya can also use Python, which some people find more appealing. Scripting has to start somewhere, and that is usually with MEL. When you need to grow to other languages, people tend to make the leap to Python. If you are in-between, Masaharu Ijichi’s ezMel2Python script may be helpful to you.

The script provides a window that will let you paste in MEL code, and with the click of a button, will translate that code into the Python. I can see where this can come in quite handy. The script exchanges one lexicon (MEL) for another, (Python). I don’t think it is intended to convert entire scripts from Maya’s embedded language to Python.

That being said if you are looking for the proper Python syntax for Maya commands, Simply paste MEL code in the  left side of the panel and hit the button.

 

 

2 comments

  1. Roy

    From the screenshot, this doesn’t look like it deals with boolean flags properly. Even in their own example, the move command and the select command are incorrect and won’t work.

    • James

      Was just about to say the same thing. It seems to just use mel2py by the looks of it. Can’t say I could ever trust a code converter

Comments are closed.