Hi,
I'm having a hard time trying to change the background color scheme via the viewportColorScheme module. For one, the class isn't mentioned in the help.
A little help would be appreciated
Thanks!
Max
Python hou.viewportColorScheme
1664 4 1- maxbel
- Member
- 36 posts
- Joined: 1月 2014
- Offline
- jjayakumar
- Member
- 106 posts
- Joined: 6月 2011
- Offline
Here you go
Hope it helps
-J
import toolutils # Get the viewports from the sceneviewer scene_viewer = toolutils.sceneViewer() viewports = scene_viewer.viewports() print(viewports) >> (<hou.GeometryViewport right1 of type Right>, <hou.GeometryViewport front1 of type Front>, <hou.GeometryViewport top1 of type Top>, <hou.GeometryViewport persp1 of type Perspective>) # Choose the viewport you want to change the color scheme persp_viewport = viewports[-1] viewport_settings = persp_viewport.settings() viewport_settings.setColorScheme(hou.viewportColorScheme.Dark)
Hope it helps
-J
- maxbel
- Member
- 36 posts
- Joined: 1月 2014
- Offline
- jjayakumar
- Member
- 106 posts
- Joined: 6月 2011
- Offline
Hi Max,
toolutils is not part of hou. It's part of the houdini python libs. You can find it here
$HFS/houdini/python2.7libs/toolutils.py
I don't think there's an official documentation page. Please check out these links.
https://jtomori.github.io/houdini_additional_python_docs/toolutils.html [jtomori.github.io]
Documentation for Other modules can be found here
https://jtomori.github.io/houdini_additional_python_docs/ [jtomori.github.io]
Having said that, you could use hou to achieve the same thing.
Cheers
-J
toolutils is not part of hou. It's part of the houdini python libs. You can find it here
$HFS/houdini/python2.7libs/toolutils.py
I don't think there's an official documentation page. Please check out these links.
https://jtomori.github.io/houdini_additional_python_docs/toolutils.html [jtomori.github.io]
Documentation for Other modules can be found here
https://jtomori.github.io/houdini_additional_python_docs/ [jtomori.github.io]
Having said that, you could use hou to achieve the same thing.
scene_viewer = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer) viewports = scene_viewer.viewports() print(viewports) >> (<hou.GeometryViewport right1 of type Right>, <hou.GeometryViewport front1 of type Front>, <hou.GeometryViewport top1 of type Top>, <hou.GeometryViewport persp1 of type Perspective>) # Choose the viewport you want to change the color scheme persp_viewport = viewports[-1] viewport_settings = persp_viewport.settings() viewport_settings.setColorScheme(hou.viewportColorScheme.Dark)
Cheers
-J
- maxbel
- Member
- 36 posts
- Joined: 1月 2014
- Offline
-
- Quick Links