Python Viewport Clipping Bug?

   922   0   1
User Avatar
Member
192 posts
Joined: Oct. 2018
Offline
I wrote a simple python script to change the Homing Auto Adjusts and the Near/Far Clip Planes of the viewport and it works fine. But after running the script, the Display Options > View tab doesn't reflect the new values. Sometimes the homing auto drop down isn't right, or is right and the near/far planes is still greyed out. But the near/far planes are always the last entered values and not the values from the python script. Anyone else having this issue?

Tested in 17.5.360

import toolutils

scene = toolutils.sceneViewer()
curView = scene.curViewport()
settings = curView.settings()

settings.setHomeAutoAdjustsClip( hou.viewportHomeClipMode.Neither )
settings.setClipPlanes( [0.001, 10000] )

homing = settings.homeAutoAdjustClip()
clip = settings.clipPlanes()

print homing
print clip
Edited by krueger - Oct. 16, 2019 22:03:25
  • Quick Links