OpenMaya.MTime Class Reference
Manipulate time data.
Constructors
Signature | Parameters | Description |
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
Operation | Result |
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.
OpenMaya.MTime.__init__ |
( |
| ) |
|
x.__init__(...) initializes x; see help(type(x)) for signature
OpenMaya.MTime.__add__ |
( |
| ) |
|
OpenMaya.MTime.__div__ |
( |
| ) |
|
OpenMaya.MTime.__eq__ |
( |
| ) |
|
OpenMaya.MTime.__ge__ |
( |
| ) |
|
OpenMaya.MTime.__gt__ |
( |
| ) |
|
OpenMaya.MTime.__iadd__ |
( |
| ) |
|
OpenMaya.MTime.__idiv__ |
( |
| ) |
|
OpenMaya.MTime.__imul__ |
( |
| ) |
|
OpenMaya.MTime.__isub__ |
( |
| ) |
|
OpenMaya.MTime.__le__ |
( |
| ) |
|
OpenMaya.MTime.__lt__ |
( |
| ) |
|
OpenMaya.MTime.__mul__ |
( |
| ) |
|
OpenMaya.MTime.__ne__ |
( |
| ) |
|
OpenMaya.MTime.__radd__ |
( |
| ) |
|
OpenMaya.MTime.__rdiv__ |
( |
| ) |
|
OpenMaya.MTime.__repr__ |
( |
| ) |
|
x.__repr__() <==> repr(x)
OpenMaya.MTime.__rmul__ |
( |
| ) |
|
OpenMaya.MTime.__rsub__ |
( |
| ) |
|
OpenMaya.MTime.__str__ |
( |
| ) |
|
OpenMaya.MTime.__sub__ |
( |
| ) |
|
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. |
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. |
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 |
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 = 44 |
|
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 = 43 |
|
static |
Name: | kUserDef |
Type: | int |
Description: | user defined (not implemented yet) |
Time units currently in use.
Name: | unit |
Type: | Unit Type constant |
Access: | RW |
Description: | Units in which to interpret the value. |
Value of the time in the current units.
Name: | value |
Type: | float |
Access: | RW |
Description: | Time value. |