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:

Why You Don’t Want to Run a Mac in Boot Camp As Your Workstation

Apple makes nice hardware and some people are tempted to run Mac machines in Windows via Boot Camp as their main workstation, thinking they are getting the familiarity of Windows with the Apple hardware. Apple’s Boot Camp drivers support the GPU, motherboard chipset, audio, etc. in your machine but there is one crucial difference that I just discovered while writing an article on ExFAT for Ars Technica: Boot Camped Windows runs your disks in IDE mode for installation compatibility reasons and there is no way to run the faster AHCI mode without doing something dodgy like using a custom bootloader like grub. That means that your SSD that will perform amazingly in OS X will be running at just over half the speed in Windows. CPU and GPU functions will be fine but this will definitely affect the overall performance of Windows in your Boot Camped Mac. Applications will launch slower, file saves will take longer and your virtual memory writes will take a serious performance hit. So there you have it - if you buy a Mac, it’s best to use it as a Mac. And that might not be such a bad thing when you compare rendering performance between OS X and Windows (not to mention multitasking abilities while doing those renders).

2 notes | Permalink

Note About Houdini Installs on OS X with Custom Python Version

I use Python 3.3 for my multithreaded Automator actions in OS X but I just realized that this prevents Houdini from installing properly if you’ve overwritten /usr/bin/python with anything other than Python 2.7. If you have a custom Python version installed, just copy the 2.7 binary back over /usr/bin/python, and then Houdini will install correctly.

0 notes | Permalink

A Script for Photoshop to Rename the Layer With The Document Name

Update: now with JavaScript version for Windows/OS X.

I do a lot of composites of similar images or render passes, so I like to have the document name as the layer name so it’s clear which document was used for the layer. I don’t know much about scripting Photoshop but I managed to piece together a very basic AppleScript to do exactly that, so grab it here if you want to:


Here is a Windows/OS X-compatible JavaScript version, courtesy of David Jensen. Tested in OS X PS CS6 and CS5 for Windows. Put it in your Photoshop folder/Presets/Scripts folder and it will appear in the File/Scripts menu.

The original AppleScript is here: Rename Front Doc with Document Name AppleScript.


Here it is in action:

I use this script so often that I ended up putting the script into an iKey hotkey so I don’t need to the AppleScript Editor to run it manually. I highly recommend iKey if you want a keyboard automation app for OS X. I also used it to map command-shift-z to command-y for Nuke’s redo function and it does a bunch of other auto-typing stuff for me.

1 note | Permalink

Maya for OS X Window Layering Tweak

I just got word of this tip that lets you alter the way that windows float in Maya for OS X. By default, floating palettes sit on top of the main window in Maya and this can be either helpful or annoying, depending on your preference. Luckily, you can change this behaviour to let the main window cover palettes by adding this line to your Maya.env file (~/Library/Preferences/Autodesk/maya/2013-x64/Maya.env on my machine):

MAYA_SET_PARENT_HINT=0

Restart Maya and you’re set. The command-` still cycles through windows, so you’re not going to lose any windows:

Update: Just thought I’d mention that, in OS X, you can click and manipulate (move, close, minimize) background windows by holding down the command key modifier when clicking. So you could have MAYA_SET_PARENT_HINT=0 on and still manipulate another window without bringing it forward:

It’s a good one to know. OS X has a lot of these little hidden command key and modifier features.

1 note | Permalink

Maya File Preview Batch Processor for OS X

In an older post and in my 101 Autodesk Maya Tips, I talked about how you can send UNIX standard output to Maya via its commandPort and I just made a tool that batch generates previews for files using an open session of Maya. I made something similar in the past but it was slow because it launched a new session of Maya for each file via command line rendering. This is very quick because it just tells an already-open app to make a new scene, import the file, kick out an antialiased viewport 2 render to JPEG, wash, rinse and repeat.

Here is the Automator workflow file to install. Don’t rename it because it contains a shell script (stmaya) that bounces commands to Maya. You need to enable commandPort on port 2222 before Maya will accept input from the action. Do it with this command (I put this line in userSetup.mel so it is executed on Maya’s launch):

commandPort -n ":2222";

The only thing to keep in mind is that the script sets the imported file folder to your working project directory, so just remember to change it to your desired project after you’re done batching or you’ll be rendering into the last-previewed /tmp folder. Also, save your existing open work before you start doing these because it uses the “file -f -new” command meaning it won’t prompt you to save if you have an open doc with unsaved changes.

If you’re on Linux, you can do a similar thing with the two shell scripts that the Automator action uses. This is the script that operates on your input 3D file and this is the stmaya script that passes standard output to Maya. It’s a bit of a hairy combo that would be much nicer as one Python script but I am just updating existing bash scripts.

Sorry, Windows users – there’s no way to pipe standard output to Maya from the command prompt in Windows, so this can’t be adapted for non-UNIX OSes.

0 notes | Permalink

Maya Crash File Opener Updated for OS X

When Maya crashes, it tries to save out a file to a temp folder that you can recover on relaunch. In my 101 Autodesk Maya Tips I mention how you can get this file to open in Maya without digging through temp folders on Mac/Win/Linux but it seems that, due to what I think is V-Ray’s redirection of standard output, I no longer get the path of the crash file in the system log. So, I’m updating the script to work more like the Linux version. It does the exact same thing but by parsing the TMPDIR environment variable:

Grab the updated shell script or Automator Service which doesn’t require a terminal. Just open it from the Services menu in OS X.. After Maya 2014 is out, I’ll be releasing an updated version of 101 Autodesk Maya Tips to incorporate this change and I’ll add some new tips as well. Existing owners should receive the updated copy for free.

1 note | Permalink

Easily Strip Out Plug-in Info from Maya Scenes

If you have a lot of plug-ins installed, you know that they can make it a pain to hand off files to other people. Since I generally sell components of my 3D illustration as stock after I complete them, it’s important to make clean assets for sale. While you can manually strip out plug-in data from Maya ASCII files, this is time consuming and there’s a much easier way to do it. Keep a copy of Maya around that has no plug-ins installed or at least no copy of the plug-in you want to strip out installed. When you open a Maya ASCII scene in that copy of Maya, it will fail to recognize nodes and data that call that plug-in so using the Optimize Scene Size dialog with “Remove Unused Nodes” will strip out those parts, leaving a cleaned file on save.

If you’re using Maya 2013 and above, you also have to worry about the new “-ch ####” data that breaks backwards compatibility, so I’m using my Automator action that strips out that data with sed and saves a “_2012_compatible” (and earlier) version. With those two techniques in mind, watch me clean all the Maxwell plug-in info from a Maya 2013 file and open it flawlessly in Maya 2010:

V-Ray is loading because it’s auto-loaded at startup.

If you’ve read my 101 Autodesk Maya Tips ebook, you might have figured out how to do this from my tip on using Optimize Scene Size and Maya ASCII scenes instead of Maya binary. /end shameless plug.

2 notes | Permalink

Nuke Scene Collector 2.1 

I just posted an updated version of Nuke Scene Collector that now supports collection of scripts that use the project directory variable to reference assets:

3 notes | Permalink

It Works! Shareless V-Ray Distributed Rendering Between OS X, Linux and Windows

A while ago, I wrote a tip for sharing assets between Mac OS X and Linux, by mimicking paths with symlinks on slave machines. It seems that workflow is no longer needed and, what’s better, you can now use Windows machines as slaves without having to worry about C: drive paths screwing up everything. The latest nightly builds of V-Ray for Maya let you transfer missing assets without worrying about network shares. Here’s my MacBook Pro getting a boost from my Windows 7 gaming rig:

I’ve tested it and it also works with Linux and I’m guessing it works with any combination of platform as slave/master.

1 note | Permalink

Nuke Scene Collector 2.0 Now Live

My Mac OS X/Linux shell script for collecting and transferring Nuke scenes and assets has been updated to version 2.0. Nuke Scene Collector 2.0 adds #### style number sequence support for Read nodes and the %04d style ones still work – you can mix them in your Nuke script without it tripping up collection. Otherwise, what gives it the 2.0 version bump is the increase bullet-proofing to the collection process. Since it was using the UNIX cp utility for copies, it could crap out if your file list was really long (like thousands of entries), so it now uses the find command and executes the copy on each entry instead of on the batch. If you care about the difference, here is how that looks. The old code for copying all EXR images with wildcard for sequences:

cp /path/to/filesequence.[0-9]*.exr /destination/

The new copy code using find and an -exec cp argument for the copy portion:

find /path/to/ -name "filesequence.[0-9]*.exr" -exec cp -i {} /destination/ \;

You can use that “find … -exec” pattern on anything really. If you want to lame encode a bunch of files in the working directory to mp3, it’s pretty much the same:

find . -name "*" -exec lame --preset extreme {} \;

Some of you are probably thinking “why not just use Python and then you could avoid this and you’d get Windows compatibility? Ya, if I was to rewrite this utility, I’d just use Python but I’m not a pipeline TD, I’m just posting stuff I use for myself so that’s not going to happen. Windows users looking for something similar can check out this. I don’t know how well it works since I’ve never used it but it seems to be fine.

0 notes | Permalink