/python/pymel/core/animation.py
https://bitbucket.org/jspatrick/emacs · Python · 7855 lines · 6779 code · 727 blank · 349 comment · 851 complexity · dda5befde114d007a2b321196b33fce8 MD5 · raw file
Large files are truncated click here to view the full file
- import pymel.internal.factories as _factories
- import general as _general
- import pymel.util as _util
- import pymel.internal.pmcmds as cmds
- import pymel.versions as versions
- from pymel.internal.pmcmds import *
- def aimConstraint(*args, **kwargs):
- """
- Constrain an object's orientation to point at a target object or at the average position of a number of targets. An
- aimConstraint takes as input one or more targetDAG transform nodes at which to aim the single constraint objectDAG
- transform node. The aimConstraint orients the constrained object such that the aimVector (in the object's local
- coordinate system) points to the in weighted average of the world space position target objects. The upVector (again
- the the object's local coordinate system) is aligned in world space with the worldUpVector.
-
- Maya Bug Fix:
- - when queried, angle offsets would be returned in radians, not current angle unit
-
- Modifications:
- - added new syntax for querying the weight of a target object, by passing the constraint first::
-
- aimConstraint( 'pCube1_aimConstraint1', q=1, weight ='pSphere1' )
- aimConstraint( 'pCube1_aimConstraint1', q=1, weight =['pSphere1', 'pCylinder1'] )
- aimConstraint( 'pCube1_aimConstraint1', q=1, weight =[] )
-
- Flags:
- - aimVector : aim (float, float, float) [create,query,edit]
- Set the aim vector. This is the vector in local coordinates that points at the target. If not given at creation time,
- the default value of (1.0, 0.0, 0.0) is used.
-
- - layer : l (unicode) [create,edit]
- Specify the name of the animation layer where the constraint should be added.
-
- - maintainOffset : mo (bool) [create]
- The offset necessary to preserve the constrained object's initial rotation will be calculated and used as the offset.
-
- - name : n (unicode) [create,query,edit]
- Sets the name of the constraint node to the specified name. Default name is constrainedObjectName_constraintType
-
- - offset : o (float, float, float) [create,query,edit]
- Sets or queries the value of the offset. Default is 0,0,0.
-
- - remove : rm (bool) [edit]
- removes the listed target(s) from the constraint.
-
- - skip : sk (unicode) [create,edit]
- Specify the axis to be skipped. Valid values are x, y, zand none. During creation, noneis the default.
- Flag can have multiple arguments, passed either as a tuple or a list.
-
- - targetList : tl (bool) [query]
- Return the list of target objects.
-
- - upVector : u (float, float, float) [create,query,edit]
- Set local up vector. This is the vector in local coordinates that aligns with the world up vector. If not given at
- creation time, the default value of (0.0, 1.0, 0.0) is used.
-
- - weight : w (float) [create,query,edit]
- Sets the weight value for the specified target(s). If not given at creation time, the default value of 1.0 is used.
-
- - weightAliasList : wal (bool) [query]
- Returns the names of the attributes that control the weight of the target objects. Aliases are returned in the same
- order as the targets are returned by the targetList flag
-
- - worldUpObject : wuo (PyNode) [create,query,edit]
- Set the DAG object use for worldUpType objectand objectrotation. See worldUpType for greater detail. The default value
- is no up object, which is interpreted as world space.
-
- - worldUpType : wut (unicode) [create,query,edit]
- Set the type of the world up vector computation. The worldUpType can have one of 5 values: scene, object,
- objectrotation, vector, or none. If the value is scene, the upVector is aligned with the up axis of the scene and
- worldUpVector and worldUpObject are ignored. If the value is object, the upVector is aimed as closely as possible to the
- origin of the space of the worldUpObject and the worldUpVector is ignored. If the value is objectrotationthen the
- worldUpVector is interpreted as being in the coordinate space of the worldUpObject, transformed into world space and the
- upVector is aligned as closely as possible to the result. If the value is vector, the upVector is aligned with
- worldUpVector as closely as possible and worldUpMatrix is ignored. Finally, if the value is noneno twist calculation is
- performed by the constraint, with the resulting upVectororientation based previous orientation of the constrained
- object, and the great circlerotation needed to align the aim vector with its constraint. The default worldUpType is
- vector.
-
- - worldUpVector : wu (float, float, float) [create,query,edit]
- Set world up vector. This is the vector in world coordinates that up vector should align with. See -wut/worldUpType
- (below)for greater detail. If not given at creation time, the default value of (0.0, 1.0, 0.0) is used.
-
-
- Derived from mel command `maya.cmds.aimConstraint`
- """
- pass
- def animCurveEditor(*args, **kwargs):
- """
- Edit a characteristic of a graph editor
-
- Flags:
- - autoFit : af (unicode) [query,edit]
- on | off | tgl auto fit-to-view
-
- - classicMode : cm (bool) []
-
- - clipTime : ct (unicode) [query,edit]
- Valid values: onoffDisplay the clips with their offset and scale applied to the anim curves in the clip.
-
- - constrainDrag : cd (int) [create,query,edit]
- Constrains all Graph Editor animation curve drag operations to either the X-axis, the Y-axis, or to neither of those
- axes. Values to supply are: 0 for not constraining any axis, 1 for constraing the X-axis, or 2 for constraining the
- Y-axis. When used in queries, this flag returns the latter values and these values have the same interpretation as
- above. Note: when the shift key is pressed before dragging the animation curve, the first mouse movement will instead
- determine (and override) any prior set constrained axis. Flag can have multiple arguments, passed
- either as a tuple or a list.
-
- - control : ctl (bool) [query]
- Query only. Returns the top level control for this editor. Usually used for getting a parent to attach popup menus.
- Caution: It is possible, at times, for an editor to exist without a control. This flag returns NONEif no control is
- present.
-
- - curvesShown : cs (bool) [query]
- Returns a string array containing the names of the animCurve nodes currently displayed in the graph editor.
-
- - curvesShownForceUpdate : csf (bool) []
-
- - defineTemplate : dt (unicode) [create]
- Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the
- argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set
- as the current template.
-
- - denormalizeCurvesCommand : dcc (unicode) [create,edit]
- Sets the script which is run to denormalize curves in the graph editor. This is intended for internal use only.
-
- - displayActiveKeyTangents : dat (unicode) [edit]
- on | off | tgl display tangents in the editor
-
- - displayActiveKeys : dak (unicode) [edit]
- on | off | tgl display tangents in the editor
-
- - displayInfinities : di (unicode) [edit]
- on | off | tgl display infinities in the editor
-
- - displayKeys : dk (unicode) [edit]
- on | off | tgl display keyframes in the editor
-
- - displayNormalized : dn (bool) [query,edit]
- When on, display all curves normalized to the range -1 to +1.
-
- - displayTangents : dtn (unicode) [edit]
- on | off | tgl display tangents in the editor
-
- - docTag : dtg (unicode) [create,query,edit]
- Attaches a tag to the Maya editor.
-
- - exists : ex (bool) [create]
- Returns true|false depending upon whether the specified object exists. Other flags are ignored.
-
- - filter : f (unicode) [create,query,edit]
- Specifies the name of an itemFilter object to be placed on this editor. This filters the information coming onto the
- main list of the editor.
-
- - forceMainConnection : fmc (unicode) [create,query,edit]
- Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will
- only display items contained in the selectionConnection object. This is a variant of the -mainListConnection flag in
- that it will force a change even when the connection is locked. This flag is used to reduce the overhead when using the
- -unlockMainConnection , -mainListConnection, -lockMainConnection flags in immediate succession.
-
- - highlightConnection : hlc (unicode) [create,query,edit]
- Specifies the name of a selectionConnection object which the editor will synchronize with its highlight list. Not all
- editors have a highlight list. For those that do, it is a secondary selection list.
-
- - lockMainConnection : lck (bool) [create,edit]
- Locks the current list of objects within the mainConnection, so that only those objects are displayed within the editor.
- Further changes to the original mainConnection are ignored.
-
- - lookAt : la (unicode) [edit]
- all | selected | currentTime fitView helpers
-
- - mainListConnection : mlc (unicode) [create,query,edit]
- Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will
- only display items contained in the selectionConnection object.
-
- - menu : m (script) [create]
- Specify a script to be run when the editor is created. The function will be passed one string argument which is the new
- editor's name.
-
- - normalizeCurvesCommand : ncc (unicode) [create,edit]
- Sets the script which is run to normalize curves in the graph editor. This is intended for internal use only.
-
- - panel : pnl (unicode) [create,query]
- Specifies the panel that the editor belongs to. By default if an editor is created in the create callback of a scripted
- panel it will belong to that panel. If an editor doesn't belong to a panel it will be deleted when the window that it
- is in is deleted.
-
- - parent : p (unicode) [create,query,edit]
- Specifies the parent layout for this editor. This flag will only have an effect if the editor is currently un-parented.
-
- - preSelectionHighlight : psh (bool) [query,edit]
- When on, the curve/key/tangent under the mouse pointer is highlighted to ease selection.
-
- - renormalizeCurves : rnc (bool) [edit]
- This flag causes the curve normalization factors to be recalculated.
-
- - resultSamples : rs (time) [query,edit]
- Specify the sampling for result curves Note: the smaller this number is, the longer it will take to update the display.
-
- - resultScreenSamples : rss (int) [query,edit]
- Specify the screen base result sampling for result curves. If 0, then results are sampled in time.
-
- - resultUpdate : ru (unicode) [query,edit]
- Valid values: interactivedelayedControls how changes to animCurves are reflected in the result curves (if results are
- being shown). If resultUpdate is interactive, then as interactive changes are being made to the animCurve, the result
- curves will be updated. If modelUpdate is delayed (which is the default setting), then result curves are updated once
- the final change to an animCurve has been made.
-
- - selectionConnection : slc (unicode) [create,query,edit]
- Specifies the name of a selectionConnection object which the editor will synchronize with its own selection list. As
- the user selects things in this editor, they will be selected in the selectionConnection object. If the object undergoes
- changes, the editor updates to show the change.
-
- - showBufferCurves : sb (unicode) [query,edit]
- Valid values: onofftglDisplay buffer curves.
-
- - showResults : sr (unicode) [query,edit]
- Valid values: onofftglDisplay result curves from expression or other non-keyed action.
-
- - showUpstreamCurves : suc (bool) [query,edit]
- If true, the dependency graph is searched upstream for all curves that drive the selected plugs (showing multiple curves
- for example in a typical driven key setup, where first the driven key curve is encountered, followed by the actual
- animation curve that drives the source object). If false, only the first curves encountered will be shown. Note that,
- even if false, multiple curves can be shown if e.g. a blendWeighted node is being used to combine multiple curves.
-
- - smoothness : s (unicode) [query,edit]
- Valid values: coarseroughmediumfineSpecify the display smoothness of animation curves.
-
- - snapTime : st (unicode) [query,edit]
- none | integer | keyframe keyframe move snap in time
-
- - snapValue : sv (unicode) [query,edit]
- none | integer | keyframe keyframe move snap in values
-
- - stackedCurves : sc (bool) [query,edit]
- Switches the display mode between normal (all curves sharing one set of axes) to stacked (each curve on its own value
- axis, stacked vertically).
-
- - stackedCurvesMax : scx (float) [query,edit]
- Sets the maximum value on the per-curve value axis when in stacked mode.
-
- - stackedCurvesMin : scm (float) [query,edit]
- Sets the minimum value on the per-curve value axis when in stacked mode.
-
- - stackedCurvesSpace : scs (float) [query,edit]
- Sets the spacing between curves when in stacked mode.
-
- - stateString : sts (bool) [query]
- Query only flag. Returns the MEL command that will edit an editor to match the current editor state. The returned
- command string uses the string variable $editorName in place of a specific name.
-
- - unParent : up (bool) [create,edit]
- Specifies that the editor should be removed from its layout. This cannot be used with query.
-
- - unlockMainConnection : ulk (bool) [create,edit]
- Unlocks the mainConnection, effectively restoring the original mainConnection (if it is still available), and dynamic
- updates.
-
- - updateMainConnection : upd (bool) [create,edit]
- Causes a locked mainConnection to be updated from the orginal mainConnection, but preserves the lock state.
-
- - useTemplate : ut (unicode) [create]
- Force the command to use a command template other than the current one.
-
-
- Derived from mel command `maya.cmds.animCurveEditor`
- """
- pass
- def animDisplay(*args, **kwargs):
- """
- This command changes certain display options used by animation windows. In query mode, return type is based on queried
- flag.
-
- Flags:
- - modelUpdate : upd (unicode) [create,query,edit]
- Controls how changes to animCurves are propagated through the dependency graph. Valid modes are none, interactiveor
- delayed. If modelUpdate is nonethen changing an animCurve will not cause the model to be updated (change currentTime in
- order to update the model). If modelUpdate is interactive(which is the default setting), then as interactive changes
- are being made to the animCurve, the model will be updated. If modelUpdate is delayed, then the model is updated once
- the final change to an animCurve has been made. With modelUpdate set to either interactiveor delayed, changes to
- animCurves made via commands will also cause the model to be updated. Flag can have multiple
- arguments, passed either as a tuple or a list.
-
- - timeCode : tc (bool) [create,query,edit]
- Controls whether the animation windows (time slider, graph editor and dope sheet) use time codes in their displays.
-
- - timeCodeOffset : tco (unicode) [create,query,edit]
- This flag has now been deprecated. It still exists to not break legacy scripts, but it will now do nothing. See the
- new timeCode command to set and query timeCodes.
-
-
- Derived from mel command `maya.cmds.animDisplay`
- """
- pass
- def animLayer(*args, **kwargs):
- """
- This command creates and edits animation layers.
-
- Modifications:
- - returns a PyNode object for flags: (query and (root or bestLayer or parent))
- - returns a list of PyNode objects for flags: (query and (children or attribute or bestAnimLayer or animCurves or baseAnimCurves or blendNodes or affectedLayers or parent))
-
- Flags:
- - addSelectedObjects : aso (bool) [create,query,edit]
- Adds selected object(s) to the layer.
-
- - affectedLayers : afl (bool) [query]
- Return the layers that the currently selected object(s) are members of
-
- - animCurves : anc (bool) [create,query,edit]
- In query mode returns the anim curves associated with this layer
-
- - attribute : at (unicode) [create,query,edit]
- Adds a specific attribute on a object to the layer.
-
- - baseAnimCurves : bac (bool) [create,query,edit]
- In query mode returns the base layer anim curves associated with this layer, if any.
-
- - bestAnimLayer : blr (bool) [create,query,edit]
- In query mode returns the best anim layers for keying for the selected objects. If used in conjunction with -at, will
- return the best anim layers for keying for the specific plugs (attributes) specified.
-
- - bestLayer : bl (bool) [query]
- Return the layer that will be keyed for specified attribute.
-
- - blendNodes : bld (bool) [create,query,edit]
- In query mode returns the blend nodes associated with this layer
-
- - children : c (unicode) [query]
- Get the list of children layers. return value is a string array.
-
- - collapse : col (bool) [create,query,edit]
- Determine if a layer is collapse in the layer editor.
-
- - copy : cp (unicode) [edit]
- Copy from layer.
-
- - copyAnimation : ca (unicode) [create,edit]
- copy animation from specified layer to destination layer, only animation that are on attribute layered by both layer
- that are concerned.
-
- - copyNoAnimation : cna (unicode) [edit]
- Copy from layer without the animation curves.
-
- - excludeBoolean : ebl (bool) [create,query,edit]
- When adding selected object(s) to the layer, excludes any boolean attributes.
-
- - excludeDynamic : edn (bool) [create,query,edit]
- When adding selected object(s) to the layer, excludes any dynamic attributes.
-
- - excludeEnum : een (bool) [create,query,edit]
- When adding selected object(s) to the layer, excludes any enum attributes.
-
- - excludeRotate : ert (bool) [create,query,edit]
- When adding selected object(s) to the layer, exclude the rotate attribute.
-
- - excludeScale : esc (bool) [create,query,edit]
- When adding selected object(s) to the layer, exclude the scale attribute.
-
- - excludeTranslate : etr (bool) [create,query,edit]
- When adding selected object(s) to the layer, excludes the translate attribute.
-
- - excludeVisibility : evs (bool) [create,query,edit]
- When adding selected object(s) to the layer, exclude the visibility attribute.
-
- - exists : ex (bool) [query]
- Determine if an layer exists.
-
- - extractAnimation : ea (unicode) [create,edit]
- transfer animation from specified layer to destination layer, only animation that are on attribute layered by both layer
- that are concerned.
-
- - findCurveForPlug : fcv (unicode) [edit]
-
- - forceUIRebuild : fur (bool) [create]
- rebuilds the animation layers user interface. Flag can have multiple arguments,
- passed either as a tuple or a list.
-
- - forceUIRefresh : uir (bool) [create]
- refreshes the animation layers user interface.
-
- - layeredPlug : lp (unicode) [query]
- returns the plug on the blend node corresponding to the specified layer
-
- - lock : l (bool) [create,query,edit]
- Set the lock state of the specified layer. A locked layer can not receive key. Default is false.
-
- - moveLayerAfter : mva (unicode) [edit]
- Move layer after the specified layer
-
- - moveLayerBefore : mvb (unicode) [edit]
- Move layer before the specified layer
-
- - mute : m (bool) [create,query,edit]
- Set the mute state of the specified layer. Default is false.
-
- - override : o (bool) [create,query,edit]
- Set the overide state of the specified layer. Default is false.
-
- - parent : p (unicode) [create,query,edit]
- Set the parent of the specified layer. Default is the animation layer root.
-
- - passthrough : pth (bool) [create,query,edit]
- Set the passthrough state of the specified layer. Default is true.
-
- - preferred : prf (bool) [create,query,edit]
- Determine if a layer is a preferred layer, the best layer algorithm will try to set keyframe in preferred layer first.
-
- - removeAllAttributes : raa (bool) [edit]
- Remove all objects from layer.
-
- - removeAttribute : ra (unicode) [edit]
- Remove object from layer.
-
- - root : r (unicode) [query]
- Return the base layer if it exist
-
- - selected : sel (bool) [create,query,edit]
- Determine if a layer is selected, a selected layer will be show in the timecontrol, graph editor.
-
- - solo : s (bool) [create,query,edit]
- Set the solo state of the specified layer. Default is false.
-
- - weight : w (float) [create,query,edit]
- Set the weight of the specified layer between 0.0 and 1.0. Default is 1.
-
- - writeBlendnodeDestinations : wbd (bool) [edit]
- In edit mode writes the destination plugs of the blend nodes that belong to the layer into the blend node. This is used
- for layer import/export purposes and is not for general use.
-
-
- Derived from mel command `maya.cmds.animLayer`
- """
- pass
- def animView(*args, **kwargs):
- """
- This command allows you to specify the current view range within an animation editor. In query mode, return type is
- based on queried flag.
-
- Flags:
- - endTime : et (time) []
- End time to display within the editor
-
- - maxValue : max (float) []
- Upper value to display within the editor
-
- - minValue : min (float) []
- Lower value to display within the editor
-
- - nextView : nv (bool) [edit]
- Switches to the next view. Flag can have multiple arguments, passed either as a tuple or a list.
-
- - previousView : pv (bool) [edit]
- Switches to the previous view.
-
- - startTime : st (time) []
- Start time to display within the editor
-
-
- Derived from mel command `maya.cmds.animView`
- """
- pass
- def applyTake(*args, **kwargs):
- """
- This command takes data in a device (refered to as a take) and converts it into a form that may be played back and
- reviewed. The take can either be imported through the readTake action, or recorded by the recordDevice action. The take
- is either converted into animation curves or if the -preview flag is used, into blendDevice nodes. The command looks for
- animation curves attached to the target attributes of a device attachment. If animation curves exist, the take is pasted
- over the existing curves. If the curves do not exist, new animation curves are created. If devices are not specified,
- all of the devices with take data and that are enabled for applyTake, will have their data applied. See also:
- recordDevice, enableDevice, readTake, writeTake
-
- Flags:
- - channel : c (unicode) [create]
- This flag overrides the set channel enable value. If a channel is specified, it will be enabled. C: The default is all
- applyTake enabled channels for the device(s).
-
- - device : d (unicode) [create]
- Specifies which device contains the take. C: The default is all applyTake enabled devices.
-
- - filter : f (unicode) [create]
- This flag specifies the filters to use during the applyTake. If this flag is used multiple times, the ordering of the
- filters is from left to right. C: The default is no filters.
-
- - preview : p (bool) [create]
- Applies the take to blendDevice nodes attached to the target attributes connected to the device attachments. Animation
- curves attached to the attributes will not be altered, but for the time that preview data is defined, the preview data
- will be the data used during playback. C: The default is to not preview.
-
- - recurseChannel : rc (bool) [create]
- When this flag is used, the children of the channel(s) specified by -c/channel are also applied. C: The default is all
- of the enabled channels.
-
- - reset : r (bool) [create]
- Resets the blendDevice nodes affected by -preview. The preview data is removed and if animation curves exist, they are
- used during playback. Flag can have multiple arguments, passed either as a tuple or a list.
-
- - specifyChannel : sc (bool) [create]
- This flag is used with -c/channel flag. When used, applyTake will only work on the channels listed with the -c/channel
- flag. C: The default is all of the enabled channels.
-
- - startTime : st (time) [create]
- The default start time for a take is determined at record time. The startTime option sets the starting time of the take
- in the current animation units. C: The default is the first time stamp of the take. If a time stamp does not exist for
- the take, 0 is used.
-
-
- Derived from mel command `maya.cmds.applyTake`
- """
- pass
- def autoKeyframe(*args, **kwargs):
- """
- With no flags, this command will set keyframes on all attributes that have been modified since an autoKeyframe -state
- oncommand was issued. To stop keeping track of modified attributes, use autoKeyframe -state offautoKeyframe does not
- create new animation curves. An attribute must have already been keyframed (with the setKeyframe command) for
- autoKeyframe to add new keyframes for modified attributes. You can also query the current state of autoKeyframing with
- autoKeyframe -query -state.
-
- Flags:
- - characterOption : co (unicode) [create,query,edit]
- Valid options are: standard, all. Dictates whether when auto-keying characters the auto-key works as usual or whether it
- keys all of the character attributes. Default is standard. Flag can have multiple arguments,
- passed either as a tuple or a list.
-
- - noReset : nr (bool) []
-
- - state : st (bool) [create,query,edit]
- turns on/off remembering of modified attributes
-
-
- Derived from mel command `maya.cmds.autoKeyframe`
- """
- pass
- def bakeClip(*args, **kwargs):
- """
- This command is used to bake clips and blends into a single clip.
-
- Flags:
- - blend : b (int, int) [create]
- Specify the indicies of the clips being blended.
-
- - clipIndex : ci (int) [create]
- Specify the index of the clip to bake.
-
- - keepOriginals : k (bool) [create]
- Keep original clips in the trax editor and place the merged clip into the visor. The default is to schedule the merged
- clip, and to keep the original clips in the visor. Flag can have multiple
- arguments, passed either as a tuple or a list.
-
- - name : n (unicode) [create]
- Specify the name of the new clip to create.
-
-
- Derived from mel command `maya.cmds.bakeClip`
- """
- pass
- def bakeResults(*args, **kwargs):
- """
- This command allows the user to replace a chain of dependency nodes which define the value for an attribute with a
- single animation curve. Command allows the user to specify the range and frequency of sampling. This command operates on
- a keyset. A keyset is defined as a group of keys within a specified time range on one or more animation curves. The
- animation curves comprising a keyset depend on the value of the -animationflag: keysOrObjects: Any active keys, when no
- target objects or -attribute flags appear on the command line, orAll animation curves connected to all keyframable
- attributes of objects specified as the command line's targetList, when there are no active keys.keys: Only act on active
- keys or tangents. If there are no active keys or tangents, don't do anything. objects: Only act on specified objects.
- If there are no objects specified, don't do anything. Note that the -animationflag can be used to override the curves
- uniquely identified by the multi-use -attributeflag, which takes an argument of the form attributeName, such as
- translateX. Keys on animation curves are identified by either their time values or their indices. Times and indices
- should be specified as a range, as shown below. -time 10:20means all keys in the range from 10 to 20, inclusive, in the
- current time unit.-index 1:5means the 2nd, 3rd, 4th, 5th, and 6th keys of each animation curve.
-
- Flags:
- - animation : an (unicode) [create]
- Where this command should get the animation to act on. Valid values are objects,keys,and keysOrObjectsDefault:
- keysOrObjects.(See Description for details.)
-
- - attribute : at (unicode) [create]
- List of attributes to select
-
- - bakeOnOverrideLayer : bol (bool) [create]
- If true, all layered and baked attribute will be added as a top override layer. Flag can have multiple
- arguments, passed either as a tuple or a list.
-
- - controlPoints : cp (bool) [create]
- This flag explicitly specifies whether or not to include the control points of a shape (see -sflag) in the list of
- attributes. Default: false. (Not valid for pasteKeycmd.)
-
- - destinationLayer : dl (unicode) []
-
- - disableImplicitControl : dic (bool) [create]
- Whether to disable implicit control after the anim curves are obtained as the result of this command. An implicit
- control to an attribute is some function that affects the attribute without using an explicit dependency graph
- connection. The control of IK, via ik handles, is an example.
-
- - float : f (floatrange) [create]
- value uniquely representing a non-time-based key (or key range) on a time-based animCurve. Valid floatRange include
- single values (-f 10) or a string with a lower and upper bound, separated by a colon (-f 10:20
-
- - hierarchy : hi (unicode) [create]
- Hierarchy expansion options. Valid values are above,below,both,and none.(Not valid for pasteKeycmd.)
-
- - includeUpperBound : iub (bool) [create]
- When the -t/time or -f/float flags represent a range of keys, this flag determines whether the keys at the upper bound
- of the range are included in the keyset. Default value: true. This flag is only valid when the argument to the -t/time
- flag is a time range with a lower and upper bound. (When used with the pasteKeycommand, this flag refers only to the
- time range of the target curve that is replaced, when using options such as replace,fitReplace,or scaleReplace.This flag
- has no effect on the curve pasted from the clipboard.)
-
- - index : index (int) [create]
- index of a key on an animCurve
-
- - minimizeRotation : mr (unicode) []
-
- - preserveOutsideKeys : pok (bool) [create]
- Whether to preserve keys that are outside the bake range when there are directly connected animation curves or a
- pairBlend node which has an animation curve as its direct input. The default (false) is to remove frames outside the
- bake range. If the channel that you are baking is not controlled by a single animation curve, then a new animation
- curve will be created with keys only in the bake range. In the case of pairBlend-driven channels, setting pok to true
- will retain both the pairBlend and its input animCurve. The blended values will be baked onto the animCurve and the
- weight of the pairBlend weight will be keyed to the animCurve during the baked range.
-
- - removeBakedAttributeFromLayer : ral (bool) [create]
- If true, all baked attribute will be removed from the layer. Otherwise all layer associated with the baked attribute
- will be muted.
-
- - resolveWithoutLayer : rwl (unicode) []
-
- - sampleBy : sb (time) [create]
- Amount to sample by. Default is 1.0 in current timeUnit
-
- - shape : s (bool) [create]
- Consider attributes of shapes below transforms as well, except controlPoints. Default: true. (Not valid for
- pasteKeycmd.)
-
- - simulation : sm (bool) [create]
- Using this flag instructs the command to preform a simulation instead of just evaluating each attribute separately over
- the range of time. The simulation flag is required to bake animation that that depends on the whole scene being
- evaluated at each time step such as dynamics. The default is false.
-
- - smart : sr ([, <type 'bool'>, <type 'float'>, ]) []
-
- - sparseAnimCurveBake : sac (bool) [create]
- When this is true and anim curves are being baked, do not insert any keys into areas of the curve where animation is
- defined. And, use as few keys as possible to bake the pre and post infinity behavior. When this is false, one key will
- be inserted at each time step. The default is false.
-
- - time : t (timerange) [create]
- time uniquely representing a key (or key range) on a time-based animCurve. Valid timeRanges include single values (-t
- 10) or a string with a lower and upper bound, separated by a colon (-t 10:20
-
-
- Derived from mel command `maya.cmds.bakeResults`
- """
- pass
- def bakeSimulation(*args, **kwargs):
- """
- This command operates on a keyset. A keyset is defined as a group of keys within a specified time range on one or more
- animation curves. The animation curves comprising a keyset depend on the value of the -animationflag: keysOrObjects: Any
- active keys, when no target objects or -attribute flags appear on the command line, orAll animation curves connected to
- all keyframable attributes of objects specified as the command line's targetList, when there are no active keys.keys:
- Only act on active keys or tangents. If there are no active keys or tangents, don't do anything. objects: Only act on
- specified objects. If there are no objects specified, don't do anything. Note that the -animationflag can be used to
- override the curves uniquely identified by the multi-use -attributeflag, which takes an argument of the form
- attributeName, such as translateX. Keys on animation curves are identified by either their time values or their indices.
- Times and indices can be given individually or as part of a list or range. -time 10palmeans the key at frame 10 (PAL
- format).-time 1.0sec -time 15ntsc -time 20means the keys at time 1.0 second, frame 15 (in NTSC format), and time 20 (in
- the currently defined global time unit).-time 10:20means all keys in the range from 10 to 20, inclusive, in the current
- time unit.Omitting one end of a range means go to infinity, as in the following examples: -time 10:means all keys from
- time 10 (in the current time unit) onwards.-time :10means all keys up to (and including) time 10 (in the current time
- unit).-time :is a short form to specify all keys.-index 0means the first key of each animation curve. (Indices are
- 0-based.)-index 2 -index 5 -index 7means the 3rd, 6th, and 8th keys.-index 1:5means the 2nd, 3rd, 4th, 5th, and 6th keys
- of each animation curve.The bakeSimulation command is obsolete. Instead, bakeResults -simulation trueshould be used.
- The bakeSimulation command has retained for backwards compatibility. This command allows the user to replace a chain of
- dependency nodes, or implicit relationship, such as those between joints and IK handles, which define the value of an
- attribute, with a single animation curve. Command allows the user to specify the range and frequency of sampling. Unlike
- the bakeResults command, this command will actually set the time of the current scene to all the times, in sequence,
- inside the given time interval before it sets the time back to when it is started. As a result, it may modify the scene.
- In query mode, return type is based on queried flag.
-
- Flags:
- - animation : an (unicode) [create]
- Where this command should get the animation to act on. Valid values are objects,keys,and keysOrObjectsDefault:
- keysOrObjects.(See Description for details.)
-
- - attribute : at (unicode) [create]
- List of attributes to select
-
- - bakeOnOverrideLayer : bol (bool) []
-
- - controlPoints : cp (bool) [create]
- This flag explicitly specifies whether or not to include the control points of a shape (see -sflag) in the list of
- attributes. Default: false. (Not valid for pasteKeycmd.)
-
- - destinationLayer : dl (unicode) []
-
- - disableImplicitControl : dic (bool) [create]
- Whether to disable implicit control after the anim curves are obtained as the result of this command. An implicit
- control to an attribute is some function that affects the attribute without using an explicit dependency graph
- connection. The control of IK, via ik handles, is an example.
-
- - float : f (floatrange) [create]
- value uniquely representing a non-time-based key (or key range) on a time-based animCurve. Valid floatRange include
- single values (-f 10) or a string with a lower and upper bound, separated by a colon (-f 10:20
-
- - hierarchy : hi (unicode) [create]
- Hierarchy expansion options. Valid values are above,below,both,and none.(Not valid for pasteKeycmd.)
-
- - includeUpperBound : iub (bool) [create]
- When the -t/time or -f/float flags represent a range of keys, this flag determines whether the keys at the upper bound
- of the range are included in the keyset. Default value: true. This flag is only valid when the argument to the -t/time
- flag is a time range with a lower and upper bound. (When used with the pasteKeycommand, this flag refers only to the
- time range of the target curve that is replaced, when using options such as replace,fitReplace,or scaleReplace.This flag
- has no effect on the curve pasted from the clipboard.)
-
- - index : index (int) [create]
- index of a key on an animCurve
-
- - minimizeRotation : mr (unicode) []
-
- - preserveOutsideKeys : pok (bool) [create]
- Whether to preserve keys that are outside the bake range when there are directly connected animation curves. The
- default (false) is to remove frames outside the bake range. If the channel that you are baking is not controlled by a
- single animation curve, then a new animation curve will be created with keys only in the bake range.
-
- - removeBakedAttributeFromLayer : ral (bool) []
-
- - resolveWithoutLayer : rwl (unicode) []
-
- - sampleBy : sb (time) [create]
- Amount to sample by. Default is 1.0 in current timeUnit
-
- - shape : s (bool) [create]
- Consider attributes of shapes below transforms as well, except controlPoints. Default: true. (Not valid for
- pasteKeycmd.)
-
- - simulation : sm (bool) [create]
- Using this flag instructs the command to preform a simulation instead of just evaluating each attribute separately over
- the range of time. The simulation flag is required to bake animation that that depends on the whole scene being
- evaluated at each time step such as dynamics. The default is true.
-
- - smart : sr ([, <type 'bool'>, <type 'float'>, ]) []
-
- - sparseAnimCurveBake : sac (bool) [create]
- When baking anim curves, do not insert any keys into areas of the curve where animation is defined. And, use as few
- keys as possible to bake the pre and post infinity behaviors. When this is false, one key will be inserted at each time
- step. The default is false. Flag can have multiple arguments, passed either as a tuple or a
- list.
-
- - time : t (timerange) [create]
- time uniquely representing a key (or key range) on a time-based animCurve. Valid timeRanges include single values (-t
- 10) or a string with a lower and upper bound, separated by a colon (-t 10:20
-
-
- Derived from mel command `maya.cmds.bakeSimulation`
- """
- pass
- def bindSkin(*args, **kwargs):
- """
- This command binds the currently selected objects to the currently selected skeletons. Shapes which can be bound are:
- meshes, nurbs curves, nurbs surfaces, lattices, subdivision surfaces, and API shapes. Multiple shapes and multiple
- skeletons can be bound at once by selecting them or specifying them on the command line. Selection order is not
- important.The skin is bound using the so-called rigidbind, in which the components are rigidly attached to the closest
- bone in the skeleton. Flexors can later be added to the skeleton to smooth out the skinning around joints.The skin(s)
- can be bound either to the entire skeleton hierarchy of the selected joint(s), or to only the selected joints. The
- entire hierarchy is the default. The -tsb/-toSelectedBones flag allows binding to only the selected bones.This command
- can also be used to detach the skin from the skeleton. Detaching the skin is useful in a variety of situations, such as:
- inserting additional bones, deleting bones, changing the bind position of the skeleton or skin, or simply getting rid of
- the skinning nodes altogether. The options to use when detaching the skin depend on how much of the skinning info you
- want to get rid of. Namely: (1) -delete or -unbind: remove all skinning nodes, (2) -unbindKeepHistory: remove the
- skinning sets, but keep the weights, (3) -disable: disable the skinning but keep the skinning sets and the weights.
-
- Flags:
- - byClosestPoint : bcp (bool) [create]
- bind each point in the object to the segment closest to the point. The byClosestPoint and byPartition flags are mutually
- exclusive. The byClosestPoint flag is the default.
-
- - byPartition : bp (bool) [create]
- bind each group in the partition to the segment closest to the group's centroid. A partition must be specified with the
- -p/-partition flag
-
- - colorJoints : cj (bool) [create]
- In bind mode, this flag assigns colors to the joints based on the colors assigned to the joint's skin set. In delete and
- unlock mode, this flag removes the colors from joints that are no longer bound as skin. In disable and unbindKeepHistory
- mode, this flag does nothing.
-
- - delete : d (bool) [create]
- Detach the skin on the selected skeletons and remove all bind- related construction history.
-
- - doNotDescend : dnd (bool) [create]
- Do not descend to shapes that are parented below the selected object(s). Bind only the selected objects.
-
- - enable : en (bool) [create]
- Enable or disable a bind that has been disabled on the selected skeletons. To enable the bind on selected bones only,
- select the bones and use the -tsb flag with the -en flag. This flag is used when you want to temporarily disable the
- bind without losing the set information or the weight information of the skinning, for example if you want to modify the
- bindPose.
-
- - name : n (unicode) [create]
- This flag is obsolete. Flag can have multiple arguments, passed either as a tuple or a list.
-
- - partition : p (unicode) [create]
- Specify a partition to bind by. This is only valid when used with the -bp/-byPartition flag.
-
- - toAll : ta (bool) [create]
- objects will be bound to the entire selected skeletons. Even bones with zero influence will be bound, whereas the
- toSkeleton will only bind non-zero influences.
-
- - toSelectedBones : tsb (bool) [create]
- objects will be bound to the selected bones only.
-
- - toSkeleton : ts (bool) [create]
- objects will be bound to the selected skeletons. The toSkeleton, toAll and toSelectedBones flags are mutually exclusive.
- The toSkeleton flag is the default.
-
- - unbind : ub (bool) [create]
- unbind the selected objects. They will no longer move with the skeleton. Any bin…