Created
July 20, 2021 03:53
-
-
Save jamesrobinsonvfx/058ac44d400db20286691254ddc06f1f to your computer and use it in GitHub Desktop.
Set viewport to camera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import toolutils as tu | |
viewer = tu.sceneViewer() | |
viewports = viewer.viewports() | |
cam = hou.node("/obj/rendercam") | |
# There are always 4 viewports! | |
# https://www.sidefx.com/forum/topic/38171/#post-174454 | |
for vp in viewports: | |
vp.setCamera(cam) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is useful wrapped up as a utility function to quickly switch between cameras via script (multi-shot workflow, etc)