Jump to content

Set Display Options in Python


gemini

Recommended Posts

I use this one to toggle Display of points on/off:

    pane = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.SceneViewer)
    settings = pane.curViewport().settings()
    markersDisplayModel = settings.displaySet(hou.displaySetType.DisplayModel)
    markersSceneObject = settings.displaySet(hou.displaySetType.SceneObject)
    # Toggle the markers (visible when inside /obj/...)
    markersDisplayModel.showPointMarkers(not markersDisplayModel.isShowingPointMarkers())
    # Unify with the scene (visible when in top level "/obj")
    markersSceneObject.showPointMarkers(markersDisplayModel.isShowingPointMarkers())

More to read is here in docs:
http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportDisplaySet
 

For example:
setShadedMode(shaded_mode) #wireframe, hidden lines, shaded with primitive face normals, outlined polygons...

Edited by ikoon
Link to comment
Share on other sites

import hou

settings = hou.ui.curDesktop() \
                 .paneTabOfType(hou.paneTabType.SceneViewer) \
                 .curViewport() \
                 .settings()

dispset = settings.displaySet(hou.displaySetType.DisplayModel)
dispset.useFadedLook(not dispset.isUsingFadedLook())

In theory it should work, but not for me on 16.0.705.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...