Chan Smartoo

c540843679

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

How to use Python to control the visualization button March 8, 2025, 8:08 a.m.

vis = hou.viewportVisualizers.visualizers(hou.viewportVisualizerCategory.Scene)

list =

for each in vis:
vname =each.label()
list.append(vname)



#desktop = hou.ui.curDesktop()
#pane = desktop.paneTabOfType(hou.paneTabType.SceneViewer)
pane = hou.ui.curDesktop().paneTabUnderCursor()
view = pane.curViewport()


sel = hou.ui.selectFromList(list, message='Select attri')

for s in sel:
v = vis
v.setIsActive(not v.isActive(view),view)

This is what I'm currently using, and it can only be controlled by making selections.

How to use Python to control the visualization button March 8, 2025, 6:19 a.m.

Does anyone know how to control the on - off state of the visualization button on the viewport toolbar using Python? I haven't found any method to control this switch. The functionality of using hou.viewportVisualizers seems to be able to control only a single one, but I want to be able to toggle the whole group, just like when I click the visualization button on the viewport toolbar with the mouse.

Python command to toggle viewport visualizer Feb. 24, 2025, 4:01 a.m.

same question~
Does anyone know how to operate Python?