[Maya-Python] Working Unit Time

692 views
Skip to first unread message

Ozgur Yılmaz

unread,
Apr 28, 2010, 12:11:37 PM4/28/10
to python_in...@googlegroups.com
Hi everybody,

a quick question, how can I set the working time unit (fps) by using pymel? If you answer is "use pymel.optionVar['workingUnitTime'] = 'pal' " it is just changing the optionVar, but not effecting the settings, as far as I see... there should be some command that updates the environment according to the optionVar settings...

I also used optionVars while updating the playblast file name, it also was not recognized until I open up the playblast options.

so any ideas?

E.Ozgur Yilmaz
Lead Technical Director
www.ozgurfx.com

--
http://groups.google.com/group/python_inside_maya

Paul Molodowitch

unread,
Apr 28, 2010, 12:47:20 PM4/28/10
to python_in...@googlegroups.com
It would seem that the connection between the option variable,
'workingUnitTime', and the actual time unit used, set by
currentUnit(t='pal'), is rather loose. There exists a mel function,
mel.syncPreferencesOptVars('syncCurrentToOpt'), which will update the
unit settings to match the option var (or vice-versa with
mel.syncPreferencesOptVars('syncOptToCurrent') ), but it doesn't do
everything that changing it from the preferences GUI will (such as
updating the time slider ranges). The stuff that the gui does can be
found in the prefsSyncSettings mel proc, in
$MAYA_LOCATION/scripts/startup/createPrefWndUI.mel. (You can find
that out, by the way, by switching on the History>>Echo All Commands
option from the script editor window, than changing the setting from
the gui.)

Also - note that currentTime has an 'updateAnimation' flag, which
will change keys so that they stay at the same time (but a different
frame number)... I think it's on by default.

- Paul
--
http://groups.google.com/group/python_inside_maya

Ozgur Yılmaz

unread,
Apr 28, 2010, 6:44:24 PM4/28/10
to python_in...@googlegroups.com
thank you paul, your snappy answer helped me a lot...


E.Ozgur Yilmaz
Lead Technical Director
www.ozgurfx.com


--
http://groups.google.com/group/python_inside_maya
Reply all
Reply to author
Forward
0 new messages