Python API 2.0 Reference
OpenMaya.MTime Class Reference
+ Inheritance diagram for OpenMaya.MTime:

Public Member Functions

def __add__ ()
 
def __eq__ ()
 
def __ge__ ()
 
def __gt__ ()
 
def __iadd__ ()
 
def __imul__ ()
 
def __init__ ()
 
def __isub__ ()
 
def __itruediv__ ()
 
def __le__ ()
 
def __lt__ ()
 
def __mul__ ()
 
def __ne__ ()
 
def __radd__ ()
 
def __repr__ ()
 
def __rmul__ ()
 
def __rsub__ ()
 
def __rtruediv__ ()
 
def __str__ ()
 
def __sub__ ()
 
def __truediv__ ()
 
def asUnits ()
 

Static Public Member Functions

def __new__ ()
 
def setUIUnit ()
 
def ticksPerSecond ()
 
def uiUnit ()
 

Static Public Attributes

int k15FPS = 5
 
int k23_976FPS = 43
 
int k24FPS = 6
 
int k25FPS = 7
 
int k29_97DF = 45
 
int k29_97FPS = 44
 
int k30FPS = 8
 
int k44100FPS = 48
 
int k47_952FPS = 46
 
int k48000FPS = 49
 
int k48FPS = 9
 
int k50FPS = 10
 
int k59_94FPS = 47
 
int k60FPS = 11
 
int k90FPS = 50
 
Unit Types
int k100FPS = 25
 
int k10FPS = 18
 
int k1200FPS = 38
 
int k120FPS = 26
 
int k125FPS = 27
 
int k12FPS = 19
 
int k1500FPS = 39
 
int k150FPS = 28
 
int k16FPS = 20
 
int k2000FPS = 40
 
int k200FPS = 29
 
int k20FPS = 21
 
int k240FPS = 30
 
int k250FPS = 31
 
int k2FPS = 12
 
int k3000FPS = 41
 
int k300FPS = 32
 
int k375FPS = 33
 
int k3FPS = 13
 
int k400FPS = 34
 
int k40FPS = 22
 
int k4FPS = 14
 
int k500FPS = 35
 
int k5FPS = 15
 
int k6000FPS = 42
 
int k600FPS = 36
 
int k6FPS = 16
 
int k750FPS = 37
 
int k75FPS = 23
 
int k80FPS = 24
 
int k8FPS = 17
 
int kFilm = 6
 
int kGames = 5
 
int kHours = 1
 
int kInvalid = 0
 
int kLast = 52
 
int kMilliseconds = 4
 
int kMinutes = 2
 
int kNTSCField = 11
 
int kNTSCFrame = 8
 
int kPALField = 10
 
int kPALFrame = 7
 
int kSeconds = 3
 
int kShowScan = 9
 
int kUserDef = 51
 

Properties

 unit = property(...)
 
 value = property(...)
 

Detailed Description

Manipulate time data.

Constructors

SignatureParametersDescription
MTime()  

Default constructor. Returns a new MTime object with value 1.0 and unit set to the current UI unit.

MTime(src) src - MTime

Copy constructor. Returns a new MTime object with the same value and unit as src.

MTime(value, unit=kFilm) value - float
unit - Unit Type constant

Returns a new MTime object with the given value and unit.

Number Support

OperationResult
MTime = MTime + MTime

Addition of another time. Uses the units of the left operand.

MTime += MTime

In-place addition of another time. Retains the units of the left operand.

MTime = MTime + float

Addition of a float value. The value is interpreted in the units of the left operand.

MTime += float

In-place addition of a float value. The value is interpreted in the units of the left operand.

MTime = MTime - MTime

Subtraction of another time. Uses the units of the left operand.

MTime -= MTime

In-place subtraction of another time. Retains the units of the left operand.

MTime = MTime - float

Subtraction of a float value. The value is interpreted in the units of the left operand.

MTime -= float

In-place subtraction of a float value. The value is interpreted in the units of the left operand.

MTime = MTime * float

Multiplication by a float value. The result uses the units of the left operand.

MTime *= float

In-place multiplication by a float value. The units of the left operand are retained.

MTime = MTime / float

Division by a float value. The result uses the units of the left operand.

MTime /= float

In-place division by a float value. The units of the left operand are retained.

Comparison Support

All comparisons are supported.

Comparisons are done in a common unit, so comparisons of times using different units will give the expected results. For example, an MTime of 60 seconds will be equal to an MTime of one minute and less than an MTime of one hour.

 


Constructor & Destructor Documentation

def OpenMaya.MTime.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMaya.MTime.__add__ ( )
Return self+value.
def OpenMaya.MTime.__eq__ ( )
Return self==value.
def OpenMaya.MTime.__ge__ ( )
Return self>=value.
def OpenMaya.MTime.__gt__ ( )
Return self>value.
def OpenMaya.MTime.__iadd__ ( )
Return self+=value.
def OpenMaya.MTime.__imul__ ( )
Return self*=value.
def OpenMaya.MTime.__isub__ ( )
Return self-=value.
def OpenMaya.MTime.__itruediv__ ( )
Return self/=value.
def OpenMaya.MTime.__le__ ( )
Return self<=value.
def OpenMaya.MTime.__lt__ ( )
Return self<value.
def OpenMaya.MTime.__mul__ ( )
Return self*value.
def OpenMaya.MTime.__ne__ ( )
Return self!=value.
def OpenMaya.MTime.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMaya.MTime.__radd__ ( )
Return value+self.
def OpenMaya.MTime.__repr__ ( )
Return repr(self).
def OpenMaya.MTime.__rmul__ ( )
Return value*self.
def OpenMaya.MTime.__rsub__ ( )
Return value-self.
def OpenMaya.MTime.__rtruediv__ ( )
Return value/self.
def OpenMaya.MTime.__str__ ( )
Return str(self).
def OpenMaya.MTime.__sub__ ( )
Return self-value.
def OpenMaya.MTime.__truediv__ ( )
Return self/value.
OpenMaya.MTime.asUnits ( )
Return the time value, converted to the specified units.
Signature: asUnits(unit)
Parameters: unit - Unit Types constant
Returns: float
Description: Returns the time value converted to the specified unit.
OpenMaya.MTime.setUIUnit ( )
static
Change the units used to display time in Maya's UI.
Name: setUIUnit(unit)
Parameters: unit - Unit Type constant
Returns: None
Description: Sets the unit type to be used by Maya's UI to display time values.
def OpenMaya.MTime.ticksPerSecond ( )
static
Returns the number of ticks per second, the smallest unit of time available.
OpenMaya.MTime.uiUnit ( )
static
Return the units used to display time in Maya's UI.
Name: uiUnit()
Parameters:  
Returns: Unit Type constant
Description: Returns the unit type currently used by Maya's UI to display time values.

Member Data Documentation

OpenMaya.MTime.k100FPS = 25
static
Name: k100FPS
Type: int
Description: 100 frames per second
OpenMaya.MTime.k10FPS = 18
static
Name: k10FPS
Type: int
Description: 10 frames per second
OpenMaya.MTime.k1200FPS = 38
static
Name: k1200FPS
Type: int
Description: 1200 frames per second
OpenMaya.MTime.k120FPS = 26
static
Name: k120FPS
Type: int
Description: 120 frames per second
OpenMaya.MTime.k125FPS = 27
static
Name: k125FPS
Type: int
Description: 125 frames per second
OpenMaya.MTime.k12FPS = 19
static
Name: k12FPS
Type: int
Description: 12 frames per second
OpenMaya.MTime.k1500FPS = 39
static
Name: k1500FPS
Type: int
Description: 1500 frames per second
OpenMaya.MTime.k150FPS = 28
static
Name: k150FPS
Type: int
Description: 150 frames per second
OpenMaya.MTime.k16FPS = 20
static
Name: k16FPS
Type: int
Description: 16 frames per second
OpenMaya.MTime.k2000FPS = 40
static
Name: k2000FPS
Type: int
Description: 2000 frames per second
OpenMaya.MTime.k200FPS = 29
static
Name: k200FPS
Type: int
Description: 200 frames per second
OpenMaya.MTime.k20FPS = 21
static
Name: k20FPS
Type: int
Description: 20 frames per second
OpenMaya.MTime.k240FPS = 30
static
Name: k240FPS
Type: int
Description: 240 frames per second
OpenMaya.MTime.k250FPS = 31
static
Name: k250FPS
Type: int
Description: 250 frames per second
OpenMaya.MTime.k2FPS = 12
static
Name: k2FPS
Type: int
Description: 2 frames per second
OpenMaya.MTime.k3000FPS = 41
static
Name: k3000FPS
Type: int
Description: 3000 frames per second
OpenMaya.MTime.k300FPS = 32
static
Name: k300FPS
Type: int
Description: 300 frames per second
OpenMaya.MTime.k375FPS = 33
static
Name: k375FPS
Type: int
Description: 375 frames per second
OpenMaya.MTime.k3FPS = 13
static
Name: k3FPS
Type: int
Description: 3 frames per second
OpenMaya.MTime.k400FPS = 34
static
Name: k400FPS
Type: int
Description: 400 frames per second
OpenMaya.MTime.k40FPS = 22
static
Name: k40FPS
Type: int
Description: 40 frames per second
OpenMaya.MTime.k4FPS = 14
static
Name: k4FPS
Type: int
Description: 4 frames per second
OpenMaya.MTime.k500FPS = 35
static
Name: k500FPS
Type: int
Description: 500 frames per second
OpenMaya.MTime.k5FPS = 15
static
Name: k5FPS
Type: int
Description: 5 frames per second
OpenMaya.MTime.k6000FPS = 42
static
Name: k6000FPS
Type: int
Description: 6000 frames per second
OpenMaya.MTime.k600FPS = 36
static
Name: k600FPS
Type: int
Description: 600 frames per second
OpenMaya.MTime.k6FPS = 16
static
Name: k6FPS
Type: int
Description: 6 frames per second
OpenMaya.MTime.k750FPS = 37
static
Name: k750FPS
Type: int
Description: 750 frames per second
OpenMaya.MTime.k75FPS = 23
static
Name: k75FPS
Type: int
Description: 75 frames per second
OpenMaya.MTime.k80FPS = 24
static
Name: k80FPS
Type: int
Description: 80 frames per second
OpenMaya.MTime.k8FPS = 17
static
Name: k8FPS
Type: int
Description: 8 frames per second
OpenMaya.MTime.kFilm = 6
static
Name: kFilm
Type: int
Description: 24 frames per second
OpenMaya.MTime.kGames = 5
static
Name: kGames
Type: int
Description: 15 frames per second
OpenMaya.MTime.kHours = 1
static
Name: kHours
Type: int
Description: 3600 seconds
OpenMaya.MTime.kInvalid = 0
static
Name: kInvalid
Type: int
Description: Invalid value
OpenMaya.MTime.kLast = 52
static
Name: kLast
Type: int
Description: Last value, used for counting
OpenMaya.MTime.kMilliseconds = 4
static
Name: kMilliseconds
Type: int
Description: 1/1000 of a second
OpenMaya.MTime.kMinutes = 2
static
Name: kMinutes
Type: int
Description: 60 seconds
OpenMaya.MTime.kNTSCField = 11
static
Name: kNTSCField
Type: int
Description: twice NTSC (60 frames per second)
OpenMaya.MTime.kNTSCFrame = 8
static
Name: kNTSCFrame
Type: int
Description: 30 frames per second
OpenMaya.MTime.kPALField = 10
static
Name: kPALField
Type: int
Description: twice PAL (50 frames per second)
OpenMaya.MTime.kPALFrame = 7
static
Name: kPALFrame
Type: int
Description: 25 frames per second
OpenMaya.MTime.kSeconds = 3
static
Name: kSeconds
Type: int
Description: 1 second
OpenMaya.MTime.kShowScan = 9
static
Name: kShowScan
Type: int
Description: twice film (48 frames per second)
OpenMaya.MTime.kUserDef = 51
static
Name: kUserDef
Type: int
Description: user defined (not implemented yet)

Property Documentation

OpenMaya.MTime.unit = property(...)
static
 Time units currently in use.
Name: unit
Type: Unit Type constant
Access: RW
Description: Units in which to interpret the value.
OpenMaya.MTime.value = property(...)
static
 Value of the time in the current units.
Name: value
Type: float
Access: RW
Description: Time value.