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

Synopsis

currentTime( [time] , [update=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

currentTime is NOT undoable, queryable, and editable.

When given a time argument (with or without the -edit flag) this command sets the current global time. The model updates and displays at the new time, unless "-update off" is present on the command line.

Return value

time

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

Flags

update
Long name (short name) Argument types Properties
update(u) boolean create
change the current time, but do not update the world. Default value is true.

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

# Query the current time
#
cmds.currentTime( query=True )

# Change the current time to "30" in current time units
#
cmds.currentTime( 30, edit=True )
cmds.currentTime( 30 )

# Change the current time to 2 seconds
#
cmds.currentTime( '2sec', edit=True )

# Change the current time, but do not cause the model
# to update.
#
cmds.currentTime( -10, update=False, edit=True )