Home Technical Talk

MAYA Hide function not working!!!! UGH!!! HELP!

polycounter
Offline / Send Message
pixelpatron polycounter
So the standard "alt H" keyboard command does nothing.

Ctrl H hides stuff, Ctrl+Shift brings it all back.....it's not the caps lock, it's not the alt key itself on the keyboard. The other alt key doesn't work either.

So I'm stumped. Bad prefs? How can I fix this? It's destroying my workflow. :poly142:

Replies

  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    I got pretty annoyed with the hotkeys for hiding/unhiding objects in Maya so I wrote a bit of code for better functionality.
    nameCommand
         -annotation "Hide/Unhide Selection"
         -command "string $lastHidden[]; string $hideselect[] = `ls -sl`; string $vis[] = { }; $count = `size $hideselect`; for ($i=0; $i < $count; $i++) { $vis[$i] = ($hideselect[$i] + \".visibility\"); $logic = `getAttr $vis[$i]`; if ( $logic == 0 ) { setAttr $vis[$i] 1; } else if ( $logic == 1 ) { setAttr $vis[$i] 0; $lastHidden = `ls -sl`; } } if ( $count == 0 ) { $count = `size $lastHidden`; if ( $count != 0 ) { for ($i=0; $i < $count; $i++) { setAttr ( $lastHidden[$i] + \".visibility\" ) 1; } select $lastHidden; } else if ( $count == 0 ) { print \"No previously hidden objects.\"; } }"
         HideToggleNamedCommand;
         hotkey -k "h" -ctl -name "HideToggleNamedCommand";
    

    With this, Ctrl+h controls all of the hiding and unhiding of objects. Previously-hidden objects can be toggled visible again by pressing Ctrl+h while no other objects are selected.

    Just throw it into the MEL command line or Script Editor and hit Enter.
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    Thanks Bartalon,

    Yet this solution doesn't work very quickly, how do you select a few objects then hide everything else? You inverting your selection every time?
  • Illusions
    Options
    Offline / Send Message
    Illusions polycounter lvl 18
    Alt +h works for me. Best I can suggest is to go into the Hotkey Editor, under "Categories" find "Display" then under "Commands" find "HideUnselectedObjects" and reassign it.

    There is also Show > Isolate Select > View Selected, but it won't be anywhere near as quick, but you can script access to this too.
  • antweiler
    Options
    Offline / Send Message
    antweiler polycounter lvl 8
    since they added a button for isolate Select on the shelf of the viewport panels, I use it more often than before. It even works with selected faces.
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    Well reassigning it to a new hotkey worked, but for whatever reason, "alt h" will not work. Even though it's on the list of available hotkeys. Ah well. Thanks for playing, just going to have to get used to using "alt n" from now on.
  • Sardu
    Options
    Offline / Send Message
    Sardu polycounter lvl 5
    You can also just throw it into a layer and hide/unhide but, of course, it's not a super quick solution.
  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    Thanks Bartalon,

    Yet this solution doesn't work very quickly, how do you select a few objects then hide everything else? You inverting your selection every time?

    Ah, yeah I suppose you'd have to invert your selection. I generally don't have a large amount of objects I need to toggle on/off with the hide hotkey. If you know a bit of MEL you should be able to tailor the code to your own work flow. If my scene starts getting cluttered I start using layers or grouping objects in the Outliner then hide the groups.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Not sure if this will help but wrote this couple of years ago if it might come in handy. Bugo also made a couple of marking menus too

    http://www.polycount.com/forum/showthread.php?t=86915
Sign In or Register to comment.