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 return as a string the name of the command previously installed convertSelection / cs bool 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 C: install selection pickmask and internal constraints for actionnameQ: returns 1 if any internal constraint is set for current action installDisplay / id bool C: install display attributes for actionnameQ: returns 1 if any display is set for current action keepInstances / ki bool Convert components for all selected instances rather than only the first selected instance. uninstallConstraint / uc bool uninstall internal constraints previously installed uninstallDisplay / ud bool uninstall display attributes previously installed Flag can have multiple arguments, passed either as a tuple or a list. 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()