Jump to content

USD Python API in Solaris


reyan

Recommended Posts

Hello wizards, 
i'm trying to get the camera from the current stage and then get the frustum
I'm following the Pixar API, but probably i'm missing something...

Here my code:
 

from pxr import Usd, UsdGeom, Sdf

node = hou.pwd()
stage = node.editableStage()

# Add code to modify the stage.
# Use drop down menu to select examples.

camera=stage.GetPrimAtPath('/cameras/camera1')
gfCam = UsdGeom.Camera(camera).GetCamera(1.0)
frustum = gfCam.GetFrustum()


Problem: GetFrustum() gave me an error, it seems that is not a method of the camera class, but it should...
Any idea ?

Edited by reyan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...