Jump to content
Nour Almasri

Open UV View (Uv Editor ) in Python

Recommended Posts

Hello ,

I'm looking for a way in python to open UV View (UV Editor) in a separate window , any help .

Share this post


Link to post
Share on other sites
import hou

desktop = hou.ui.curDesktop()
pane = desktop.createFloatingPane(hou.paneTabType.SceneViewer)

# Get the display settings
settings = pane.curViewport().settings()

I did this code which open a new window for the scene viewer , but missing the last step to switch it to Uv View  .

Share this post


Link to post
Share on other sites

I've been looking for it and what I was able to find was just: hou.geometryViewportType.UV

This is used to test if the current viewport is for example a UV viewport. For example:

import hou

cur = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer,0)
viewport = cur.curViewport()
if viewport.type() == hou.geometryViewportType.UV:
    print "is UV viewport"
else:
    print "is not UV viewport"

Also there is GeometryViewportSettings and viewportType but I have not been able to make them work correctly

http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportSettings.html 

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

×