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

Synopsis

polyInstallAction( name , [commandName=boolean], [convertSelection=boolean], [installConstraint=boolean], [installDisplay=boolean], [keepInstances=boolean], [uninstallConstraint=boolean], [uninstallDisplay=boolean])

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

polyInstallAction is undoable, queryable, and NOT editable.

Installs/uninstalls several things to help the user to perform the specified action :

Return value

string[] When installing constraint, returns as an array of strings the items on which the installed command will act on. otherwise, returns nothing

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

Related

polyListComponentConversion, polySelectConstraint, polySelectConstraintMonitor

Flags

commandName, convertSelection, installConstraint, installDisplay, keepInstances, uninstallConstraint, uninstallDisplay
Long name (short name) Argument types Properties
convertSelection(cs) boolean create
convert all polys selected in object mode into their full matching component selection. For example : if a polyMesh is selected,
polyInstallAction -cs polyCloseBorder
will select all border edges.
commandName(cn) boolean query
return as a string the name of the command previously installed
installConstraint(ic) boolean createquery

C: install selection pickmask and internal constraints for actionname
Q: returns 1 if any internal constraint is set for current action
installDisplay(id) boolean createquery

C: install display attributes for actionname
Q: returns 1 if any display is set for current action
uninstallConstraint(uc) boolean create
uninstall internal constraints previously installed
uninstallDisplay(ud) boolean create
uninstall display attributes previously installed
keepInstances(ki) boolean create
Convert components for all selected instances rather than only the first selected instance.

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

# Will set pickmask to edges, install internal constraint
# so that only border edges may be selected.
cmds.polyInstallAction( 'polyCloseBorder', ic=True )

# Same as previous, plus force the display of borders if the
# user didn't asked explicitely for it before.
cmds.polyInstallAction( 'polyCloseBorder', ic=True, id=True )

# Shortcut for polyInstallAction -ic -id polyCloseBorder;
cmds.polyInstallAction( 'polyCloseBorder' )

# Assuming the previous install was for closeBorder,
# will release internal border constraint, but go on displaying
# borders if the user didn't asked explicitely for it before.
cmds.polyInstallAction( uc=True )

# Assuming the previous install was for closeBorder,
# will release internal border constraint, stop displaying
# borders if the user didn't asked explicitely for it before.
cmds.polyInstallAction( uc=True, ud=True )

# Shortcut for polyInstallAction -uc -ud;
cmds.polyInstallAction()