You can use both MEL and Python in your solutions. MEL goes in mel files,
and python goes in py files.

How to call python code from your mel scripts:
http://download.autodesk.com/global/docs/maya2014/en_us/Commands/python.html

How to call mel code from your python scripts:

import maya.mel as mm
mm.eval(SOME_MEL_CODE_STRING)

​

On Mon, Jun 1, 2015 at 10:28 AM Christopher. <[email protected]>
wrote:

> That's what I thought.  How can I have a mixed bag of MEL and Python,
> would you need to see one of the other parts of the script ?
>
>
> On Sunday, May 31, 2015 at 3:49:14 PM UTC-4, Justin Israel wrote:
>
>> You are trying to mix python and MEL syntax together? You can't do that,
>> unless it's Mel code that uses the python() function to call python code,
>> and visa versa.
>>
>> # some .py
>> def foo():
>>     # py syntax
>> foo()
>>
>> // some .mel
>> global proc foo() {
>>     // Mel syntax
>> }
>>
>> On Mon, 1 Jun 2015 7:34 AM Christopher. <[email protected]> wrote:
>>
>>> Hi, I have a script that uses the def() syntax, the problem is the
>>> original code is MEL, using the following syntax is not working ?
>>>
>>> def acme()
>>> [MEL code]
>>> acme()
>>>
>>>
>>>
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/89a8b58e-6287-467f-b3c3-5137356b6a9b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/89a8b58e-6287-467f-b3c3-5137356b6a9b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/89d09d96-1048-44cb-9bf1-676f036c9837%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/89d09d96-1048-44cb-9bf1-676f036c9837%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0wsij9RHWHS_3V6RuKZUayNp5vR538rc2741ba8HiqjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to