pymel.core.animation.marker

static animation.marker(*args, **kwargs)

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 -omoption 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.

Flags:
Long name (short name) Argument Types Properties
attach (a) bool ../../../_images/create.gif
 
This flag specifies to attach the selected 3D position markers to their parent geometry.
detach (d) bool ../../../_images/create.gif
 

This flag specifies to detach the selected position markers from their parent geometry to the 3D space. Flag can have multiple arguments, passed either as a tuple or a list.

frontTwist (ft) float ../../../_images/query.gif
 
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) bool ../../../_images/query.gif
 
This flag specifies creation of an orientation marker.Default is not set..When queried, this flag returns a boolean.
positionMarker (pm) bool ../../../_images/query.gif
 
This flag specifies creation of a position marker.Default is set.When queried, this flag returns a boolean.
sideTwist (st) float ../../../_images/query.gif
 
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 ../../../_images/query.gif
 
This flag specifies the time for the marker.Default is the current time.When queried, this flag returns a time.
upTwist (ut) float ../../../_images/query.gif
 
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 ../../../_images/query.gif
 

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.

Derived from mel command maya.cmds.marker

Example:

import pymel.core as pm

# Create a simple motion path animation:

# create a path, e,g, a curve
path = pm.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 = pm.sphere()
pm.scale( 0.5, 2.0, 0.2 )

# animate the object using a motion path with follow on
pm.pathAnimation( object[0], f=1, stu=0, etu=30, c=path )
# Result: u'motionPath1' #

# change the current time to be frame 20
pm.currentTime( 20, edit=True )
# Result: 20.0 #

# Create a position marker on the path, at curve parameter value
# 0.75 and at current time:
pm.marker( path, u=0.75 )
# Result: [u'positionMarker3'] #

# Create an orientation marker on the path, at time 15:
pm.marker( path, om=True, t=15 )
# Result: [u'orientationMarker1'] #

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

Previous topic

pymel.core.animation.listAnimatable

Next topic

pymel.core.animation.mirrorJoint

Core

Core Modules

Other Modules

This Page