Python Toggle Perspective Reference Plane

   1709   3   1
User Avatar
Member
191 posts
Joined: 10月 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
7741 posts
Joined: 9月 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 - 2019年5月17日 18:56:25
User Avatar
Member
191 posts
Joined: 10月 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
スタッフ
1072 posts
Joined: 7月 2005
Offline
This was indeed a bug. Fixed in 17.0.589 (and 17.5.264).
  • Quick Links