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:

Easy Fix to Make Maya 2013 Scenes Compatibile with Older Maya Versions

I mentioned a while ago that Maya 2013 breaks compatibility with older versions since it added some data to the Maya ASCII format that the other versions don’t understand. Well, it seems that this is pretty easily addressed with a simple find and replace in a text editor. The offending flag is “-ch #####”, where the ### is any number of whatever length. To make 2013 scenes compatible with older Maya versions, just replace that flag and the space after it with nothing:

If you have a text editor that supports regular expressions, use a regular expression in the find field and replace all with nothing. This is what that would look like:

Note that there is a space at the end after the “" that you can’t see – In BBEdit, regular expressions are referred to as GREP, the Unix app that finds things by regular expressions. I’m using BBEdit and it’s really good with giant text files like these but I went a step further and made a shell script for OS X and Linux that just does it all in one step with sed and saves out a file at the same location with a “_2012_compatible.ma” extension. Anyway, you can see it all works perfectly in this video:

The shell script can be downloaded here for OS X and here for Linux (tested in CentOS 6.3). OS X and Linux use different versions of the basename util so the syntax is slightly different.

Update: There is now a Python version of the stripper script that works with Windows as well as OS X and Linux. Thanks to Dhruv Govil for that. The Python script can be run from within Maya or from a command line. To run it from a command line, enter “python /path/to/stripper_2013.py /path/to/scene.ma”. Check the script contents on how to run it from within Maya.

I also made an Automator action for OS X that does the same thing:

Grab that here.

If you don’t know what version the document was created with, I made another Automator action that reads Maya ASCII files and tells you what it is with Growl:

Grab that here. It requires the growlnotify command line app be installed in /usr/local/bin/

5 notes | Permalink

  1. sanfranciscoburning reblogged this from polygonspixelsandpaint
  2. polygonspixelsandpaint posted this