vScourge
03-02-2008, 09:54 PM
I recently gave a lecture at GDC 2008 called Python for Technical Artists (https://www.cmpevents.com/GD08/a.asp?option=C&V=11&SessID=6459).
One of the examples I used (and posted online) showed how to use an external Python script to send MEL commands to Maya. That is, using commandPorts from a standalone Python script, rather than using the embedded Python interpreter/API in Maya. It could also send Python commands, for that matter.
The reason this is interesting to me (and driving 3ds Max the same way via COM) is because it enables us to develop one common tool script and, with very few lines of MaxScript or MEL, easily make it work with both apps. Getting more cross-app mileage from our tools has been a recent focus of mine.
The example script was "createSpheresMaya.py" in the COM folder of the examples download, posted on the Volition GDC Archive (http://www.volition-inc.com/gdc).
Hope someone finds it useful. May be wickedly dull old news, too. We're primarily a 3ds Max house and I'm not too dialed-in to the latest and greatest Maya/MEL stuff. :)
One of the examples I used (and posted online) showed how to use an external Python script to send MEL commands to Maya. That is, using commandPorts from a standalone Python script, rather than using the embedded Python interpreter/API in Maya. It could also send Python commands, for that matter.
The reason this is interesting to me (and driving 3ds Max the same way via COM) is because it enables us to develop one common tool script and, with very few lines of MaxScript or MEL, easily make it work with both apps. Getting more cross-app mileage from our tools has been a recent focus of mine.
The example script was "createSpheresMaya.py" in the COM folder of the examples download, posted on the Volition GDC Archive (http://www.volition-inc.com/gdc).
Hope someone finds it useful. May be wickedly dull old news, too. We're primarily a 3ds Max house and I'm not too dialed-in to the latest and greatest Maya/MEL stuff. :)
