Feb 112013
 

Many operations in Maya will run faster if Maya doesn’t have to refresh the viewport while running them. For example, if you switch the viewport to only show the Graph Editor before baking animation, or caching particles or Alembic geometry, the operation will happen much faster than if Maya had to actually display the geometry for each frame that it’s being baked. There is probably a way via the API to tell Maya’s viewport not to refresh, but since I don’t know shit about the API, here’s a workaround using a few of Maya’s less-documented MEL commands and some Python.

I wrote this method assuming that artists would want to cache out information frequently without it disrupting their workflow. That means that I needed to first store the user’s current panel layout, then switch it to something that doesn’t require a refresh on every frame (like the Graph Editor), and then restore the previously restored layout.

I prefer coding in Python, but some of the procedures I’m running are MEL functions that are found in scripts/startup and so they’re not documented and they don’t have Python equivalents. A hybrid approach is the best way to handle it, since MEL is terrible.

Click for some Python code… Continue reading »

Feb 012013
 

Just wanted to document a dumb little problem I was having. My compositors need cameras in .FBX format, and I had a camera that had a Look At object (an aim vector) which wasn’t being considered in the export. I tried parenting a duplicate of the first camera to the original and exporting that, but of course I just ended up with a still camera.

The solution is to use CHOPs. Make a CHOP network, then drop down an Object CHOP. Select the object you want to bake as the Target Object. Then you can create a duplicate of your original object, and use this expression to drive any of the channels you need to bake:

chop("../chopnet1/objectCHOPname/channelName")

Or you can use an Export CHOP, point it to the duplicate object, and make sure the Path field includes the full list of channels you want to export (such as t[xyz] and r[xyz]).