pymel.core.general.showHidden

showHidden(*args, **kwargs)

The showHiddencommand is used to make invisible objects visible. If no flags are specified, only the objects given to the command will be made visible. If a parent of an object is invisible, the object will still be invisible. Invisibility is inherited. To ensure the object becomes visible, use the -a/above flag. This forces all invisible ancestors of the object(s) to be visible. If the -b/below flag is used, any invisible objects below the object will be made visible. To make all objects visible, use the -all/allObjects flag. See also:hide

Flags:

Long Name / Short Name Argument Types Properties
above / a bool ../../../_images/create.gif
  Make objects and all their invisible ancestors visible.
allObjects / all bool ../../../_images/create.gif
  Make all invisible objects visible.
below / b bool ../../../_images/create.gif
  Make objects and all their invisible descendants visible.
lastHidden / lh bool ../../../_images/create.gif
  Show everything that was hidden with the last hide command. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.showHidden

Example:

import pymel.core as pm

# create a sphere and group it, then hide the sphere and the group.
pm.sphere( n='sphere1' )
# Result: [nt.Transform(u'sphere1'), nt.MakeNurbSphere(u'makeNurbSphere1')] #
pm.group( n='group1' )
# Result: nt.Transform(u'group1') #
pm.hide( 'group1', 'sphere1' )

# make the sphere visible. Note that you still can't see it
# because the group is invisible.
pm.showHidden( 'sphere1' )

# make the sphere and the group visible.
pm.showHidden( 'sphere1', above=True )

# make everything visible. This will make the cameras (which are
# normally invisible) visible as well.
pm.showHidden( all=True )