Jump to content
gemini

Set Display Options in Python

Recommended Posts

Can easily be changed the actual scene view / Display Options / Effect / Material / Set Geo Color in python ?

And how ? ;)

THX

Edited by gemini

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

"Faded" may not exactly what you think it is. It just suppresses geometry color on the model. "DisplayModel" also only affects the geometry of displayed SOP when inside a SOP network. Are you looking for the ghosted look instead?

Share this post


Link to post
Share on other sites

This Geometry Color propery is signed as a Material Property ( RMB on the right side of the Scene View ).  Maybe helps..  Sorry i have not so much practise in this.. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×