Go to: Synopsis. Return value. Keywords. Flags. Python examples.

Synopsis

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

Return value

timevalues

In query mode, return type is based on queried flag.

Keywords

timecode, time

Flags

mayaStartFrame, productionStartFrame, productionStartHour, productionStartMinute, productionStartSecond
Long name (short name) Argument types Properties
mayaStartFrame(msf) float createqueryedit
Sets the Maya start time of the time code, in frames. In query mode, returns the Maya start frame of the time code.
productionStartFrame(psf) float createqueryedit
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.
productionStartHour(psh) float createqueryedit
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 createqueryedit
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 createqueryedit
Sets the production start time of the time code, in terms of seconds. In query mode, returns the second of production start time.

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.

Python examples

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