Jump to content

Assigning "Frame Selected" to a mouse hotkey


cultmethod

Recommended Posts

Hi all, I'm trying to remap the hotkey SPACE + G (Center the view on all selected objects/geometry) to a thumb mouse button. I'm not the greatest at Python but I think I'm close to finding the relevant functions.

This is what I got:
 

import stateutils

scene_viewer = stateutils.find_scene_viewer()
cur_view = hou.ui.paneTabUnderCursor().curViewport()
cur_view.frameSelected()

I have no idea if this will work, because I have no clue how to run this code in Houdini. I think I read that I need to create a tool first, and then call that tool from the UI. I have no idea how to do that though.

Is there a chance someone could help me out here? I have this function mapped the same way in all 3D apps I use, and it would be really nice in Houdini as well.

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