Jump to content

Recommended Posts

I would like to create a hotkey that will toggle between manual and auto update modes. I know how to add a hotkey for each of these states, but I would like to be able to press one key combination to switch from one mode to the other. Any ideas about how to implement this?

Share this post


Link to post
Share on other sites

you can create a shelf tool and set a keyboard shortcut

auto = hou.updateMode.AutoUpdate
manual = hou.updateMode.Manual

if hou.updateModeSetting()==auto:
  hou.setUpdateMode(manual)
else:
  hou.setUpdateMode(auto)

 

  • Like 2

Share this post


Link to post
Share on other sites

Hi eolophus,
this should work. You need to create a shelf tool, and assign a hotkey to it:

mode = hou.updateModeSetting().name()
if mode == 'AutoUpdate':
    hou.setUpdateMode(hou.updateMode.Manual)
if mode == 'Manual':
    hou.setUpdateMode(hou.updateMode.AutoUpdate)

 

I once made an image, how to create a shelf tool, and assign a hotkey, here:
https://forums.odforce.net/topic/31240-rotating-in-increments/?do=findComment&comment=173469

I hope that it helps.

 

  • Like 1

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

×