Taro Ozaki

TaroOzaki

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

How to change uv set in viewport via pythonSOP? Jan. 18, 2021, 2:40 a.m.

SOLVED!

import hou
import toolutils

# getUVattrib fromParam
node = hou.pwd()
uv = node.parm("uv").eval()

# getCurrentViewports
view = toolutils.sceneViewer()
viewports = view.viewports()

# getViewportSettings
viewSetting = viewports[3].settings()

#setUVattribName
viewSetting.setUVDisplayAttribute(uv)

How to change uv set in viewport via pythonSOP? Jan. 13, 2021, 9:02 p.m.

Thanks.
Exactly, my aim is to change UV set automatically in UV-HDA on each cook.
Is there a better way?

And I'm a mega python newbie, so don't know how custom python state works.

How to change uv set in viewport via pythonSOP? Jan. 13, 2021, 11:39 a.m.

Hi! I woud like to find a way to change uv set in viewport via PythonSOP.

Can anyone help me?

I have tried "setUVDisplayAttribute(uv)" like below, but it doesnt work.
import hou
node = hou.pwd()
uv = node.parm("uv").eval()
self = hou.GeometryViewportSettings
hou.GeometryViewportSettings.setUVDisplayAttribute(self, uv)