|
| OPENMAYA_ENUM (Unit, kInvalid, kHours, kMinutes, kSeconds, kMilliseconds, kGames, k15FPS=kGames, kFilm, k24FPS=kFilm, kPALFrame, k25FPS=kPALFrame, kNTSCFrame, k30FPS=kNTSCFrame, kShowScan, k48FPS=kShowScan, kPALField, k50FPS=kPALField, kNTSCField, k60FPS=kNTSCField, k2FPS, k3FPS, k4FPS, k5FPS, k6FPS, k8FPS, k10FPS, k12FPS, k16FPS, k20FPS, k40FPS, k75FPS, k80FPS, k100FPS, k120FPS, k125FPS, k150FPS, k200FPS, k240FPS, k250FPS, k300FPS, k375FPS, k400FPS, k500FPS, k600FPS, k750FPS, k1200FPS, k1500FPS, k2000FPS, k3000FPS, k6000FPS, k23_976FPS, k29_97FPS, k29_97DF, k47_952FPS, k59_94FPS, k44100FPS, k48000FPS, k90FPS, kUserDef, kLast) |
| Time units.
|
|
| MTime () |
| Default class constructor. More...
|
|
| MTime (const MTime &) |
| Copy Constructor. More...
|
|
| ~MTime () |
| The class destructor.
|
|
Unit | unit () const |
| Returns the current units in effect for this instance. More...
|
|
double | value () const |
| Returns the current time value in the units that are currently in effect for this instance. More...
|
|
MStatus | setUnit (Unit new_unit) |
| Set the current units in effect on this MTime instance. More...
|
|
MStatus | setValue (double new_value) |
| Set the current time value in the current units for this instance. More...
|
|
double | as (Unit other_unit) const |
| Returns the current time value in the given units. More...
|
|
double | asUnits (Unit other_unit) const |
| Returns the current time value in the given units. More...
|
|
MTime & | operator= (const MTime &rhs) |
| Assignment operator. More...
|
|
bool | operator== (const MTime &rhs) const |
| Equality operator. More...
|
|
bool | operator!= (const MTime &rhs) const |
| InEquality operator. More...
|
|
bool | operator<= (const MTime &rhs) const |
| Less than or equal to operator. More...
|
|
bool | operator>= (const MTime &rhs) const |
| Greater than or equal to operator. More...
|
|
bool | operator< (const MTime &rhs) const |
| Less than operator. More...
|
|
bool | operator> (const MTime &rhs) const |
| Greater than operator. More...
|
|
MTime | operator+ (const MTime &rhs) const |
| Addition with another MTime. More...
|
|
MTime & | operator+= (const MTime &rhs) |
| In-place addition with another MTime. More...
|
|
MTime | operator+ (double rhs) const |
| Addition with a double. More...
|
|
MTime & | operator+= (double rhs) |
| In-place addition with a double. More...
|
|
MTime | operator- (const MTime &rhs) const |
| Subtraction of another MTime. More...
|
|
MTime & | operator-= (const MTime &rhs) |
| In-place subtraction of another MTime. More...
|
|
MTime | operator- (double rhs) const |
| Subtraction of a double. More...
|
|
MTime & | operator-= (double rhs) |
| In-place Subtraction of a double. More...
|
|
MTime | operator* (double rhs) const |
| Multiplication by a scalar operator. More...
|
|
MTime & | operator*= (double rhs) |
| In place multiplication by a scalar operator. More...
|
|
MTime | operator/ (double rhs) const |
| Division by a scalar operator. More...
|
|
MTime & | operator/= (double rhs) |
| In place division by a scalar operator. More...
|
|
MTime & | operator++ () |
| NO SCRIPT SUPPORT. More...
|
|
MTime & | operator++ (int) |
| NO SCRIPT SUPPORT. More...
|
|
MTime & | operator-- () |
| NO SCRIPT SUPPORT. More...
|
|
MTime & | operator-- (int) |
| NO SCRIPT SUPPORT. More...
|
|
Set and retrieve animation time values in various unit systems.
The MTime class provides a fundamental type for the Maya API to hold and manipulate animation timing information in various unit systems. All API methods that require or return timing information do so through variables of this type.
If one desires to manipulate time in such a way that integer changes in an MTime instance result in integer changes in the frame displayed by the timeslider, then an MTime instance should be created that uses UI units. This can be done either by using the default constructor, or by passing the return value of the static method uiUnit to the normal constructor. Once such an MTime instance is created, its value will be equivalent to a frame on the timeslider.
It should be noted that while the timeslider displays frames, a seemingly unitless value, Maya internally is operating based on the desired frameRate (one of those specified by the MTime::Unit enum. It is necessary for the API programmer to be aware of this as MTime instances are not unitless and allow the manipulation of time in any desired units.
- Examples:
- AbcBullet/AbcBullet.cpp, AbcBullet/MayaUtility.cpp, AbcExport/AbcExport.cpp, AbcExport/MayaCameraWriter.cpp, AbcExport/MayaPointPrimitiveWriter.cpp, AbcExport/MayaUtility.cpp, AbcImport/AbcImport.cpp, AbcImport/AlembicNode.cpp, AbcImport/CameraHelper.cpp, AbcImport/NodeIteratorVisitorHelper.cpp, AbcImport/util.cpp, animCubeNode/animCubeNode.cpp, animImportExport/animFileUtils.cpp, animInfoCmd/animInfoCmd.cpp, atomImportExport/atomAnimLayers.cpp, atomImportExport/atomAnimLayers.h, atomImportExport/atomFileUtils.cpp, atomImportExport/atomFileUtils.h, atomImportExport/atomImportExport.cpp, atomImportExport/atomImportExport.h, blast2Cmd/blast2Cmd.cpp, captureViewRenderCmd/captureViewRenderCmd.cpp, createClipCmd/createClipCmd.cpp, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheCmd.h, gpuCache/gpuCacheGeometry.h, gpuCache/gpuCacheMaterialBakers.cpp, gpuCache/gpuCacheMaterialBakers.h, gpuCache/gpuCacheShapeNode.cpp, gpuCache/gpuCacheSubSceneOverride.cpp, interpPlugins/interpFlat.cpp, interpPlugins/interpFlat.h, interpPlugins/interpHalf.cpp, interpPlugins/interpHalf.h, interpZero/interpZero.cpp, latticeNoise/latticeNoiseNode.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, motionPathCmd/motionPathCmd.cpp, motionTraceCmd/motionTraceCmd.cpp, ownerEmitter/ownerEmitter.cpp, ownerEmitter/ownerEmitter.h, particlePathsCmd/particlePathsCmd.cpp, renderViewInteractiveRenderCmd/renderViewInteractiveRenderCmd.cpp, simpleEmitter/simpleEmitter.cpp, simpleEmitter/simpleEmitter.h, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simpleFluidEmitter/simpleFluidEmitter.cpp, simpleSimulationNode/simpleSimulationNode.cpp, spiralAnimCurveCmd/spiralAnimCurveCmd.cpp, sweptEmitter/sweptEmitter.cpp, sweptEmitter/sweptEmitter.h, testNsolverNode/testNsolverNode.cpp, testNucleusNode/testNucleusNode.cpp, XmlGeometryCache/XmlGeometryCache.cpp, and XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp.