View Full Version : mel - linear unit change?

10 October 2011, 10:47 AM
I've got a whole bunch of files, hundreds of 'em, where the linear units setup is inconsistent.
We've got meters, centimeters, and feet, and probably chains, poles, and furlongs as well knowing my luck.

So anyhow I've got to batch them all into centimeters by loading the file, changing the setting and resaving.
Is there a mel command to change the linear units setting? The script editor echo doesn't show anything particularly useful.

10 October 2011, 10:57 AM
Ah - found it

currentUnit -linear "cm";

10 October 2011, 11:04 AM
oh dear God... you are going to regret doing this! ;) Maya's unit setup is the most god-awful mess I've ever had to workaround in Maya and is probably the one thing that causes us the most issues across studios/projects...

Anyway, to switch units use the currentUnit command. (or, the "changeLinearUnit" script if you also want to reset the grid like Maya does when you manually switch)

CGTalk Moderation
10 October 2011, 11:04 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.