pymel.core.animation.currentTime

currentTime(*args, **kwargs)

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.

Modifications:
  • if no args are provided, the command returns the current time
Flags:
Long name (short name) Argument Types Properties
update (u) bool ../../../_images/create.gif
 

change the current time, but do not update the world. Default value is true.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.currentTime

Example:

import pymel.core as pm

import maya.cmds as cmds

# Query the current time
#
pm.currentTime( query=True )
# Result: 1.0 #

# Change the current time to "30" in current time units
#
pm.currentTime( 30, edit=True )
# Result: 30.0 #
pm.currentTime( 30 )
# Result: 30.0 #

# Change the current time to 2 seconds
#
pm.currentTime( '2sec', edit=True )
# Result: 48.0 #

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

Previous topic

pymel.core.animation.copySkinWeights

Next topic

pymel.core.animation.cutKey

Core

Core Modules

Other Modules

This Page