Programmatically selecting camera for viewport in hython

   1049   1   0
User Avatar
Member
301 posts
Joined: July 2005
Offline
I have generate a HIP file scene that has geometry, camera and Mantra node.

How do I set the current camera as the rendering camera ?

Attachments:
Screenshot from 2021-02-12 14-35-13.png (25.2 KB)

Nicholas Yue
User Avatar
Member
7794 posts
Joined: Sept. 2011
Online
Set the Mantra node's 'camera' parameter to the path to the camera node to render with that camera in Mantra.

If the scene is generated by script, then the python would be something like:

ifd = hou.node('/out/mantra1')
ifd.parm('camera').set('/obj/shotcam1')
  • Quick Links