Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle, interactive iPad edition and DRM-free EPUB/PDF editions. Work faster, cry less. Read more about the ebook.




Follow cgbeige on Twitter

Topics by tag:



Recently published articles by Dave G:



Free downloads by Dave G:



Mac OS X-only downloads:

IT WORKS!!! I made a one-size-fits-all MEL code sender for Mac

I got jealous of Textmate’s ability to send MEL text to Maya so I made an Automator workflow to have it work from any Cocoa text app (BBEdit seen here but you could select page text in Safari and it would work). Works great with huge chunks of code (tested here with my GoZBuddy and V-Ray Tuner 2:

Don’t worry – the errors you see in the Script Editor are from older versions that didn’t quite work. Anyway, All you have to do to get this running is run this command in Maya to have it receive commands from Ruby.

commandPort -n ":2222";

(Put it in your shelf or usersetup.mel for easy access):

The Automator action is available here. Installation is the same as always – put it in ~/Library/Services and it will appear in the Services menu. The code is based on Michael Sheets’ code for Textmate:

You could also use the OS X System Preferences panel to add a hotkey to the command, to save more time. The joys of UNIX (stdin, Ruby) and OS X’s Automator. If ever you needed OS X propaganda, I think that would be it. Want to see the coolest usage yet? Testing code posted in a browser (you’ll need a Cocoa browser like Safari to see the Services menu):

For people using other browsers, it’s trivial to make that Automator workflow work with the clipboard.

3 notes | Permalink

  1. polygonspixelsandpaint posted this