Python Toggle Perspective Reference Plane

   224   3   1
User Avatar
Member
76 posts
Joined: Oct. 2018
Offline
I'm trying to use python to turn off / on the reference plane in the current viewport, is there an easy way to do this? I see hou.ReferencePlane but it seems to control the construction plane instead of the reference plane…

pane = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.SceneViewer)

refPlane = pane.referencePlane()

toggle = not refPlane.isVisible()

refPlane.setIsVisible( toggle )

Any ideas how to fix this?
User Avatar
Member
2347 posts
Joined: Sept. 2011
Offline
This looks like a bug to me. There's even a separate hou.ConstructionPlane class and constructionPlane method in the paneTab object. Both control the construction plane.

Edit:

Only the reference plane class's visibility state is incorrectly connected to the construction plane's visibility. The other controls seem to be working correctly for size and resolution of the grid.
Edited by jsmack - May 17, 2019 18:56:25
User Avatar
Member
76 posts
Joined: Oct. 2018
Offline
I'm thinking bug too cause it looks like hou.ReferencePlane is new to 17. There's also hou.GeometryViewportSettings.showReferenceGrid, but that's not implemented yet. We're still on 17.0.352 so I'm not sure if it's fixed in later builds or not..
User Avatar
Staff
992 posts
Joined: July 2005
Offline
This was indeed a bug. Fixed in 17.0.589 (and 17.5.264).
  • Quick Links