What's New in MEL and Python
 
 
 

New startup flag to enable compatibility warnings

A new Maya startup flag, -3, has been added to enable Python 3000 compatibility warnings.

New advanced techniqes section added

The Python book has a new advanced techniques section that provides guidelines for creating an editor window using Python.

PyMEL installed with Maya

PyMEL is now installed with Maya. For more information about PyMEL, see the PyMEL documentation.

New commands

The following commands have been added:

Obsolete commands

The following commands have been removed:

Changes to existing commands

Almost all flags which take MEL scripts now support Python scripts as well.

All commands for creating controls and layouts have added the following flags:

All constraint commands have added a -layer/l flag.

All artisan paint contexts have added the following flags:

Controls can now be reparented (-parent flag is editable).

The following flags have been added to the iconTextButton, iconTextCheckBox, iconTextRadioButton, iconTextStaticLabel, nodeIconButton and shelfButton commands:

For the dynPaintEditor, imageWindowEditor, renderWindowEditor and textureWindow commands, their -scaleBlue/db, -scaleGreen/dg and -scaleRed/sr flags now take float arguments rather than int.

For the manipMoveContext, manipRotateContext and manipScaleContext commands, their -activeHandle/ah flag now takes an int rather than float.

In addition, there have been the following changes to individual commands:

about

Flags added:

  • -fontInfo/foi
  • -qtVersion/qt
  • -windowManager/wm

allNodeTypes

Flags added:

  • -includeAbstract/ia

animCurveEditor

Flags added:

  • -displayNormalized/-dn;
  • -preSelectionHighlight/psh;
  • -renormalizeCurves/rnc;
  • -stackedCurves/sc;
  • -stackedCurvesMin/scm;
  • -stackedCurvesMax/scx;
  • -stackedCurvesSpace/scs;
  • -showUpstreamCurves/suc

animView

Flags added:

  • -nextView/nv
  • -previousView/pv

artAttrSkinPaintCtx

Flags added:

  • -paintSelectionMode/spm
  • -skinPaintMode/spm

button

Flags changed:

  • -align flag is now ignored
  • -actionIsSubstitute flag is now ignored.

checkBox

Flags changed:

  • -align flag is now ignored

control

Flags changed:

  • -backgroundColor flag is respected on all platforms

camera

Flags added:

  • -horizontalPan/hpn
  • -panZoomEnabled/pze
  • -renderPanZoom/rpz
  • -verticalPan/vpn
  • -zoom/zom

cameraView

Flags added:

  • -bookmarkType/typ

clipEditor

Flags added:

  • -clipStyle/cs
  • -manageSequencer/ms

Flags removed:

  • -characterOutline/co

cmdScrollFieldExecuter

Flags added:

  • -commandCompletion/cco
  • -objectPathCompletion/opc
  • -spacesPerTab/spt
  • -showTooltipHelp/sth
  • -tabsForIndent/tfi

commandLine

Flags added:

  • -holdFocus/hf

commandPort

Flags added:

  • -sourceType/stp
  • -pickleOutput/po

confirmDialog

Flags added:

  • -icon/icn

container

Flags added:

  • -includeNetworkDetails/ind
  • -isContainer/isc
  • -type/typ
  • -unbindChild/unc
  • -unbindParent/ubp

containerProxy

Flags added:

  • -fromTemplate/ft
  • -type/typ

containerTemplate

Flags added:

  • -addBindingSet/abs
  • -bindingSetList/bsl
  • -childAnchor/can
  • -parentAnchor/pan
  • -publishNodeList/pnl
  • -removeBindingSet/rbs
  • -rootTransform/rtn
  • -updateBindingSet/ubs

copySkinWeights

Flags added:

  • -noBlendWeight/nbw
  • -normalize/nr
  • -sampleSpace/spa

curveCVCtx and curveEPCtx

Flags added:

  • -bezier/bez

cycleCheck

Flags added:

  • -firstCycleOnly/fco
  • -firstPlugPerNode/fpn
  • -lastPlugPerNode/lpn
  • -listSeparator/ls

directKeyCtx

Flags added:

  • -selectedOnly/so

editorTemplate

Flags added:

  • -addAdskAssetControls/aac

error

Flags added:

  • -showLineNumber/sl

file

Flags added:

  • -applyTo/at
  • -compress/cmp
  • -exportUnloadedReferences/eur
  • -mapPlaceHolderNamespace/mns
  • -mergeNamespacesOnClash/mnc
  • -preserveName/pn

Flags changed:

  • -command/c now takes a second parameter which is the restore script

findType

Flags added:

  • -deep/d
  • -type/t

Flags removed:

  • -all

frameLayout

Flags changed:

  • -labelAlign and -labelWidth flags are now ignored.

getPanel

Flags added:

  • -atPosition/ap

group

Flags added:

  • -useAsGroup/uag

hotBox

Flags added:

  • -noClickPosition/ncp
  • -position/pos

hotkey

Flags changed:

  • -key flag can accept modifiers

iconTextButton

Flags changed:

  • -actionIsSubstitute flag is now ignored.

iconTextScrollList

Flags added:

  • -dropRectCallback/drc
  • -itemAt/ia
  • -visualRectAt/vra

ikSystem

Flags changed:

  • -solverTypes/st no longer takes an argument

itemFilterAttr

Flags added:

  • -hasDrivenKey/hdk

ls

Flags added:

  • -containers/con
  • -lockedNodes/ln
  • -persistentNodes/pn
  • -referenceNodes/rn
  • -undeletable/ud

lsThroughFilter

Flags added:

  • -item/it

lsUI

Flags added:

  • -dumpWidgets/dw
  • -numWidgets/nw

Flags removed:

  • -filters/f

manipOptions

Flags added:

  • -rememberActiveHandle/rah

manipRotateContext

Flags added:

  • -useManipPivot/ump

manipScaleContext

Flags added:

  • -alignAlong/aa
  • -mode/m
  • -orientAxes/oa
  • -orientTowards/ot
  • -useManipPivot/ump

menu

Flags added:

  • -fullPathName/fpn

modelEditor

Flags added:

  • -cameraSet/cst
  • -ignorePanZoom/ipz
  • -modelPanel/mp
  • -viewType/vt

nParticle

Flags changed:

  • -dynamicAttrList/dal no longer takes an argument

namespace

Flags added:

  • -query/q
  • -recurse/r
  • -relativeNames/rel
  • -rename/ren

namespaceInfo

Flags added:

  • -recurse/r

nodeOutliner

Flags added:

  • -showPublished/sp

outlinerEditor

Flags added:

  • -pinPlug/pin
  • -showPinIcons/spi
  • -showUpstreamCurves/suc
  • -unpinPlug/unp

paneLayout

Flags changed:

  • -staticWidthPane/swp
  • -staticHeightPane/shp

particle

Flags changed:

  • -dynamicAttrList/dal no longer takes an arg

playblast

Flags added:

  • -combineSound/csd
  • -indexFromZero/ifz
  • -quality/qlt
  • -replaceAudioOnly/rao
  • -replaceEndTime/ret
  • -replaceFilename/rf
  • -replaceStartTime/rst
  • -sequenceTime/sqt
  • -useTraxSounds

pluginInfo

Flags changed:

  • -cacheFormat/cf
  • -dragAndDropBehaviour/ddb
  • -dependNode/dn
  • -device/dv
  • -iksolver/ik
  • -translator/t

These flags no longer take any args.

polyAutoProjection

Flags changed:

  • -pivot/pvt
  • -pivotX/pvx
  • -pivotY/pvy
  • -pivotZ/pvz

These flags all take floats instead of lengths.

polyOptions

Flags added:

  • -displayInvisibleFaces/dif

polySelect

Flags added:

  • -edgeUVLoopOrBorder/euv

polySlideEdge

Flags added:

  • -edgeDirection/ed now takes float instead of length

polySplitEdge

Flags added:

  • -operation/op

preloadRefEd

Flags changed:

  • -selectFileNode/sf no longer takes an arg

promptDialog

Flags added:

  • -style/st now takes a string rather than an int

radioButton

Flags changed:

  • -align flag is now ignored

referenceEdit

Flags changed:

  • -editCommand/ed and -onReferenceNode/orn are now multi-use

referenceQuery

Flags added:

  • -child/ch
  • -isExportEdits/iee
  • -isLoaded/il
  • -liveEdits/le

Flags changed:

  • -editCommand/ec and -onReferenceNode/orn are now multi-use

refresh

Flags added:

  • -suspend/su

renderWindowEditor

Flags added:

  • -colorManage/com

scale

Flags added:

  • -localSpace/ls
  • -orientAxes/oa
  • -objectSpace/os
  • -worldSpace/ws

scriptNode

Flags added:

  • -sourceType/stp

select

Flags added:

  • -containerCentric/cc

selectPref

Flags added:

  • -autoSelectContainer/asc

separator

Flags changed:

  • -style flag now has valid values of "none", "single", "in" and "out" (double, doubleDash just creates single dash).

skinCluster

Flags added:

  • -addToSelection/ats
  • -forceNormalizeWeights/fnw
  • -normalizeWeights/nw
  • -removeFromSelection/rfs
  • -selectInfluenceVerts/siv
  • -skinMethod/sm
  • -volumeBind/vb
  • -volumeType/vt

skinPercent

Flags added:

  • -zeroRemainingInfluences/zri
  • -transformMoveWeights/tmw

sound

Flags added:

  • -mute/m
  • -sourceEnd/se
  • -sourceStart/ss

stereoCameraView

Flags added:

  • -ignorePanZoom/ipz
  • -modelPanel/mp
  • -stereoDrawMode/sdm
  • -viewType/vt

Flags removed:

  • -stereoCmd/sc
  • -stereoCmdDefault/scd

stereoRigManager

Flags added:

  • -cameraSetFunc/csf

surface

Flags changed:

  • -degreeU/du and -degreeV/dv now take ints instead of floats

tabLayout

Controls now have scroll buttons on all platforms if there is not enough space to display all the tabs. There is a right-mouse button menu attached to each button, listing all the tabs and making it possible to quickly select any tab.

text

Flags added:

  • -wordWrap/w

textureWindow

Flags added:

  • -drawSubRegions/dsr

timer

The old command has been completely replaced with a new one with different flags.

transferAttributes

Flags added:

  • -matchChoice/mch

translator

Flags added:

  • -loaded/ld

treeView

Flags added:

  • -allowHiddenParents/ahp
  • -enableKeys/enk
  • -itemSelected/isl
  • -showItem/shi

Flags removed:

  • -drawSelectionBackground

Flags changed:

  • -borderHighlite/bh, -expandItem/ei, -highlite/hl, -itemVisible/iv, -reverseTreeOrder/rto and -selectItem/si now take booleans instead of floats or ints;
  • -children/ch, -itemIndex/idx, -itemExists/iex, -isItemExpanded/iie, -isLeaf/il and -itempParent/ip are all now query-only.

warning

Flags added:

  • -showLineNumber/sl

window

Flags changed:

  • -minimizeCommand and -restoreCommand flags are now respected on all platforms
  • -interactivePlacement flag is now ignored.

windowPref

Flags added:

  • -restoreMainWindowState/rms
  • -saveMainWindowState/sms

Flags changed:

  • -parentMain/pm takes a boolean rather than an int