Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Farmfield

Hide/unhide node guides in the viewport

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... ;)

Share this post


Link to post
Share on other sites

Are you able to post a screenshot of the "guides" you are referring to? :)

Share this post


Link to post
Share on other sites

LOL, you missed them? :D

Here's the copy SOP...

guide.gif

Share this post


Link to post
Share on other sites

uncheck 'Current geometry' then just select another node. Not as convenient as a hotkey but is fast.

 

Share this post


Link to post
Share on other sites
import toolutils

scene_viewer = toolutils.sceneViewer()
viewport_settings = scene_viewer.curViewport().settings()

toggle = not viewport_settings.guideEnabled( hou.viewportGuide.NodeGuides )
viewport_settings.enableGuide( hou.viewportGuide.NodeGuides, toggle )

This should work.

Share this post


Link to post
Share on other sites
12 hours ago, Farmfield said:

LOL, you missed them? :D

Ahaha, just making sure :D

By the way, Tom's script works!

Share this post


Link to post
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
3 people like this

Share this post


Link to post
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
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now