Jump to content

Hide/unhide node guides in the viewport


Recommended Posts

Tried asking this in the SESI forums but no solution so far, so I'll try here too then. :)

Is there a shortcut for hiding/unhiding the node guides in the viewport? If not, how do I create one?

And I'm talking about the guides, not the handles, like with the copy SOP, etc... And yes, I know I can disable them in the display options, but I would really like a hotkey so I can just pop them on/off when I need to - like you can in most other comp and 3D apps... ;)

Link to comment
Share on other sites

This one will toggle the guides for all visible Scene Viewers:

panes = hou.ui.currentPaneTabs()
for p in panes:
    if p.type().name() == 'SceneViewer':
        guide = hou.viewportGuide.NodeGuides
        val = p.curViewport().settings().guideEnabled(guide)
        p.curViewport().settings().enableGuide(guide, not val)

Thanks again to Tom, for the general code to toggle the guides.

The documentation currently seems to incorrectly list guideEnabled as enableGudie (notice two entries of enableGuide in GeometryViewportSettings). RFE'd!
H16.0.550

Edited by galagast
added link to docs
  • Like 3
Link to comment
Share on other sites

Works like a charm - you guys are awesome - OD Force rules, as usual! Posted it on SESI forums as well (crediting you guys, of course) perhaps it'll help someone else with this issue some day. Much appreciated, guys! :)

On a sidenote, I really gotta get into HOM, hehe, I've just pushed it forward for years now... :rolleyes:

Edited by Farmfield
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...