View Full Version : MEL command to change linear unit
deadalvs 02-07-2008, 09:30 AM hi.
i am searching the MEL command that changes the linear unit to meters.
i am bored of changing this everytime i start maya for a new scene...
thanks for any input.
|
|
BadG3r
02-07-2008, 09:45 AM
normally you should be able to save it with your preferences... but I know that sometimes maya just doesnt want to handle it (the good old vanishing mental ray tabs .. hehe).
here is your command:
currentUnit -linear "m";
greets
deadalvs
02-07-2008, 09:53 AM
heya !
yep, i have played with that command, but the general scene unit setting in the preferences is not displayed accordingly... is that just a «display issue» because the prefs window is not updated ?
it remains a bitter taste ...
BadG3r
02-07-2008, 10:06 AM
you dont have to keep it open. just close it. do the change and reopen it.
i think its because the changes in preferences just effects them when saved as long you do not save it nothing will happen... or something like that. but it willl change I tested it myself.
:)
deadalvs
02-07-2008, 10:10 AM
aaah, me likes...
will put this to the userSetup.mel...
thanks !
deadalvs
02-07-2008, 10:28 AM
yes !
i put it like this in the userSetup.mel file:
((
from an other thread i know that at maya startup, the userSetup.mel files are executed before the actual new scene is generated.
for exaple if you add the command «sphere;» in the userSetup.mel, the sphere will not show up because it had already been deleted by the file -n command which is the last standard command at maya startup.
--> just use the evalDeferred command that waits until maya has completely started up and is IDLE for the first time.
))
-->
evalDeferred ("currentUnit -linear \"m\"");
BadG3r
02-07-2008, 11:24 AM
cool... thx for sharing
CGTalk Moderation
02-07-2008, 11:24 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.