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 offis 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 change the current time, but do not update the world. Default value is true. Flag 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 # 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 #