Jump to content
gemini

Set Scene View To 'HomeToSelection'

Recommended Posts

Posted (edited)

Can I force the scene view to 'homeToSelection' ? I found the hou.GeometryViewport class but how can I get it in h16.5 ?

THX!!

G

Edited by gemini

Share this post


Link to post
Share on other sites
import toolutils
# Get the viewports from the sceneviewer
scene_viewer = toolutils.sceneViewer()
viewports = scene_viewer.viewports()
print(viewports)
>> (<hou.GeometryViewport right1 of type Right>, <hou.GeometryViewport front1 of type Front>, <hou.GeometryViewport top1 of type T
op>, <hou.GeometryViewport persp1 of type Perspective>)
# Choose the viewport you want to home selection
persp_viewport = viewports[-1]
persp_viewport.homeSelected()
  

Hope it helps :)

-J

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

×