pymel.core.general.timeCode

timeCode(*args, **kwargs)

Use this command to query and set the time code information in the file

Flags:

Long Name / Short Name Argument Types Properties
mayaStartFrame / msf float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.timeCode

Example:

import pymel.core as pm

# set the production start time to 1 hour, 33 min, 52 seconds, and 23 frames
pm.timeCode(productionStartHour=1,productionStartMinute=33,productionStartSecond=52,productionStartFrame=23)
# query the production start time
#
pm.timeCode(query=1,productionStartHour=True)
# Result: 1 #
// result: 1
pm.timeCode(query=1,productionStartMinute=True)
// result: 33