There are some documentation about functions to do that, but I cannot seem to make it work.
With information from here: http://www.sidefx.com/docs/houdini/hom/tool_script.html [www.sidefx.com]
And here: http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportSettings.html [www.sidefx.com]
I tried the following code:
scene_view = toolutils.sceneViewer() viewport = scene_view.curViewport() viewportsettings=viewport.settings() viewportsettings.setLighting(hou.viewportLighting.Off) #Return: AttributeError: 'GeometryViewportSettings' object has no attribute 'setLighting'
Why am I getting this AttributeError: ‘GeometryViewportSettings’ object has no attribute ‘setLighting’ ?
This page [www.sidefx.com] clearly says that the GeometryViewportSettings class has a function setLighting.
I must be missing something really stupid, I know it !

On another side, I read this post: https://www.sidefx.com/forum/topic/41699/ [www.sidefx.com]
that mention this:
The lighting modes aren't directly represented by a single setting in the viewport, they're more like macros that set these 4 settings:
viewlight -l on|off // Lighting on/off
vieweroption -h on|off // Headlight on/off
viewlight -h on|off // HQ Lighting on/off
viewdisplay -X on|off // shadows on/off
Therefor I try the following:
hou.hscript("viewlight -l off")
'', ‘viewlight: Invalid usage\nviewlight\n\n Controls viewport settings.\n\n This command is used internally by Houdini to save the options set\n on a viewport.\n\n RELATED\n\n * viewdispopts\n\n * viewdispset\n\n’)

