// Creation Date: 15 June 1998 // // Author: rns // // Description: // Toggles the visibility attribute of the objects passed to it // (I've mapped "toggleVisibility `ls -sl`" to Ctrl + h) // global proc toggleVisibility (string $list[]) { for ($each in $list) { if (`attributeQuery -ex -n $each "visibility"`) { string $toit = $each + ".visibility"; int $state = !`getAttr $toit`; print ("setAttr " + $toit + " " + $state + "\n"); setAttr $toit $state; } } }