Go to: Synopsis. Return value. Keywords.
Flags. Python
examples.
timeCode([mayaStartFrame=float], [productionStartFrame=float],
[productionStartHour=float],
[productionStartMinute=float],
[productionStartSecond=float])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
timeCode is undoable, queryable, and editable.
Use this command to query and set the time code information in the
file
In query mode, return type is based on queried flag.
timecode, time
mayaStartFrame, productionStartFrame, productionStartHour, productionStartMinute, productionStartSecond
Long name (short name) |
Argument types |
Properties |
productionStartHour(psh) |
float |
|
|
Sets the production start time of the time code, in terms of
hours. In query mode, returns the hour of production start
time. |
|
productionStartMinute(psm) |
float |
|
|
Sets the production start time of the time code, in terms of
minutes. In query mode, returns the minute of production start
time. |
|
productionStartSecond(pss) |
float |
|
|
Sets the production start time of the time code, in terms of
seconds. In query mode, returns the second of production start
time. |
|
productionStartFrame(psf) |
float |
|
|
Sets the production start time of the time code, in terms of
frames. In query mode, returns the sub-second frame of production
start time. |
|
mayaStartFrame(msf) |
float |
|
|
Sets the Maya start time of the time code, in frames. In query
mode, returns the Maya start frame of the time code. |
|
Flag can appear in Create mode of
command |
Flag can appear in Edit mode of command |
Flag can appear in Query mode of command |
Flag can have multiple arguments, passed
either as a tuple or a list. |
import maya.cmds as cmds
# set the production start time to 1 hour, 33 min, 52 seconds, and 23 frames
cmds.timeCode(productionStartHour=1,productionStartMinute=33,productionStartSecond=52,productionStartFrame=23)
# query the production start time
#
cmds.timeCode(query=1,productionStartHour=True)
// result: 1
cmds.timeCode(query=1,productionStartMinute=True)
// result: 33