Changing visibility of external objects in Python

   848   1   0
User Avatar
Member
4 posts
Joined: 5月 2010
Offline
I’m struggling to find the relevant hou API call that changes the visibility of external objects. The equivalent of clicking the scene viewer button in the image below.



I’ve looked into the displaySets and methods on the viewport & panetab itself but I can’t seem to find this specific functionality.

Could anyone point me in the right direction, if this is indeed exposed in the HOM?

Attachments:
Picture1.png (250.6 KB)

User Avatar
Member
26 posts
Joined: 5月 2019
Offline
Hey, I ran into the same wall as you did. It *seems* like there's no way to directly set that button - or at least I never found it (I suspect they're a sort of macro for various viewport settings).

In the end I got around it by changing the "Viewport Settings" (similar to how it would be done in the Display > Optimize (tab) > Culling > Visible Objects )

Like so (i'm making my own scene viewer in this example):
desktop = hou.ui.curDesktop()
myPane = desktop.createFloatingPane(hou.paneTabType.SceneViewer)
viewport = myPane.curViewport()
settings = viewport.settings()
settings.setVisibleObjects("/obj/myObject")
Edited by mrSmokey - 2024年12月6日 07:35:35
  • Quick Links