Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

marker( [string] , [attach=boolean], [detach=boolean], [frontTwist=angle], [orientationMarker=boolean], [positionMarker=boolean], [sideTwist=angle], [time=time], [upTwist=angle], [valueU=float])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

marker is undoable, queryable, and editable.

The marker command creates one or two markers, on a motion path curve, at the specified time and location. The optionnal string argument is the parent object name.

One can specify "-pm -om" option to create both, a position marker and an orientation marker.

Since there is only one keyframe for each marker of the same type, no more than one marker of the same type with the same time value can exist.

The default marker type is the position marker. The default time is the current time.

Return value

string[](name of the created markers)

In query mode, return type is based on queried flag.

Flags

attach, detach, frontTwist, orientationMarker, positionMarker, sideTwist, time, upTwist, valueU
Long name (short name) Argument types Properties
attach(a) boolean create
This flag specifies to attach the selected 3D position markers to their parent geometry.
detach(d) boolean create
This flag specifies to detach the selected position markers from their parent geometry to the 3D space.
frontTwist(ft) angle query
This flag specifies the amount of twist angle about the front vector for the marker.
Default is 0.
When queried, this flag returns a angle.
orientationMarker(om) boolean query
This flag specifies creation of an orientation marker.
Default is not set..
When queried, this flag returns a boolean.
positionMarker(pm) boolean query
This flag specifies creation of a position marker.
Default is set.
When queried, this flag returns a boolean.
sideTwist(st) angle query
This flag specifies the amount of twist angle about the side vector for the marker.
Default is 0.
When queried, this flag returns a angle.
time(t) time query
This flag specifies the time for the marker.
Default is the current time.
When queried, this flag returns a time.
upTwist(ut) angle query
This flag specifies the amount of twist angle about the up vector for the marker.
Default is 0.
When queried, this flag returns a angle.
valueU(u) float query
This flag specifies the location of the position marker w.r.t. the parent geometry u parameterization.
Default is the value at current time.
When queried, this flag returns a linear.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Create a simple motion path animation:

# create a path, e,g, a curve
path = cmds.curve(d=3,p=[(-10, 0, 0),(-6, 0, 10),(-3, 0, -10),(10, 0, 0)],k=[0, 0, 0, 1, 1, 1])

# Create an object, e.g. a sphere
object = cmds.sphere()
cmds.scale( 0.5, 2.0, 0.2 )

# animate the object using a motion path with follow on
cmds.pathAnimation( object[0], f=1, stu=0, etu=30, c=path )

# change the current time to be frame 20
cmds.currentTime( 20, edit=True )

# Create a position marker on the path, at curve parameter value
# 0.75 and at current time:
cmds.marker( path, u=0.75 )

# Create an orientation marker on the path, at time 15:
cmds.marker( path, om=True, t=15 )

# Create a position marker and an orientation marker on the path,
# at curve parameter value .35 and at time 10:
cmds.marker( path, pm=True, om=True, t=10, u=0.35 )