pymel.core.modeling.polyInstallAction

polyInstallAction(*args, **kwargs)

Installs/uninstalls several things to help the user to perform the specified action : PickmaskInternal selection constraintsDisplay attributes

Flags:
Long name (short name) Argument Types Properties
commandName (cn) bool ../../../_images/query.gif
 
return as a string the name of the command previously installed
convertSelection (cs) bool ../../../_images/create.gif
 

convert all polys selected in object mode into their full matching component selection. For example : if a polyMesh is selected, polyInstallAction -cs polyCloseBorderwill select all border edges.

installConstraint (ic) bool ../../../_images/create.gif ../../../_images/query.gif
 
C: install selection pickmask and internal constraints for actionnameQ: returns 1 if any internal constraint is set for current action
installDisplay (id) bool ../../../_images/create.gif ../../../_images/query.gif
 
C: install display attributes for actionnameQ: returns 1 if any display is set for current action
keepInstances (ki) bool ../../../_images/create.gif
 

Convert components for all selected instances rather than only the first selected instance. Flag can have multiple arguments, passed either as a tuple or a list.

uninstallConstraint (uc) bool ../../../_images/create.gif
 
uninstall internal constraints previously installed
uninstallDisplay (ud) bool ../../../_images/create.gif
 
uninstall display attributes previously installed

Derived from mel command maya.cmds.polyInstallAction

Example:

import pymel.core as pm

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

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

# Shortcut for polyInstallAction -ic -id polyCloseBorder;
pm.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.
pm.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.
pm.polyInstallAction( uc=True, ud=True )

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

Previous topic

pymel.core.modeling.polyInfo

Next topic

pymel.core.modeling.polyLayoutUV

Core

Core Modules

Other Modules

This Page