camera, units, time … action!


The power of scripting never ceases to amaze me.  One of the biggest things that bothers me on a daily basis (albeit) a small and simple issue, is that when you bring a model in for rigging the scene size, frames, and camera are never setup correctly.  We have a mel script at work to do some of this for us, but at home I was at a loss tonight, so I decided, it can’t be that hard to do…and found out it wasn’t!  Here you go, a few lines of python code and voila, scene units, time, and cameras setup.

import maya.cmds as cmds
cmds.setAttr( 'perspShape.nearClipPlane', .001 )
cmds.setAttr( 'perspShape.farClipPlane', 1000 )
cmds.currentUnit( linear='m' )
cmds.currentUnit( time='ntscf' )

Leave a Reply

Your email address will not be published. Required fields are marked *