pymel.core.general.hide

hide(*args, **kwargs)

The hidecommand is used to make objects invisible. If no flags are used, the objects specified, or the active objects if none are specified, will be made invisible.

Flags:

Long Name / Short Name Argument Types Properties
allObjects / all bool ../../../_images/create.gif
  Make everything invisible (top level objects).
clearLastHidden / clh bool  
   
clearSelection / cs bool ../../../_images/create.gif
  Clear selection after the operation.
invertComponents / ic bool ../../../_images/create.gif
  Hide components that are not specified.
returnHidden / rh bool ../../../_images/create.gif
  Hide objects, but also return list of hidden objects.
testVisibility / tv bool ../../../_images/create.gif
  Do not change visibility, just test it (returns 1 is invisible, 2 if visible, 3 if partially visible). Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.hide

Example:

import pymel.core as pm

pm.hide( all=True )
pm.hide( pm.ls( type='nurbsSurface' ) )