Jump to content

Custom toggle shortcut


eolophus

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?

Link to comment
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
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...