running MEL scripts

Help
2007-06-11
2013-03-24
  • Moe Goldberg
    Moe Goldberg
    2007-06-11

    Hi
    I've looked through the documentation, and I can't seem to figure out how to run a MEL script from python (the equivalent of MEL's "source"). Is this possible?

    Thanks for any help.

    -Moe

     
    • Matthias Baas
      Matthias Baas
      2007-06-11

      "source" is a MEL keyword, not a MEL command, that's why it is not directly available in the mel module. But you can use the eval command to execute some MEL code that runs the MEL script:

      from maya import mel
      mel.eval('source "...path to your mel file..."')

      - Matthias -

       
    • Moe Goldberg
      Moe Goldberg
      2007-06-12

      Thanks!