This file contains hidden or 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
# USD create camera and set attributes | |
import omni.usd | |
from pxr import UsdGeom, Gf, Usd, UsdGeom, Vt, Sdf | |
stage = omni.usd.get_context().get_stage() | |
camera = UsdGeom.Camera.Define(stage, f'/Motions/my_camera0') | |
camera.CreateClippingRangeAttr().Set((1,1000000)) # e.g. (1, 1000000) | |
# camera.AddTransformOp().Set(tx) |
This file contains hidden or 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
# how to do references to multiple files | |
import omni.usd | |
from pxr import UsdGeom | |
stage = omni.usd.get_context().get_stage() | |
sphere = stage.OverridePrim('/my_prim') | |
sphere.GetReferences().AddReference('./HelloWorld0.usda') | |
sphere.GetReferences().AddReference('./HelloWorld1.usda') |
NewerOlder