Created
January 25, 2022 23:02
-
-
Save spatial-bit/70ca4ba032a791bf60a587dea258f4ba to your computer and use it in GitHub Desktop.
USD more get cameras #USD #OMNIVERSE
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
# def _get_cameras(stage, filter) -> typing.List: | |
# """ Get all cameras in the scene except for the ones that are excluded (ie: Perspective, Top, Left, Right cameras) | |
# """ | |
# cameras = {} | |
# for prim in Usd.PrimRange(stage.GetPseudoRoot()): | |
# if prim.IsA(UsdGeom.Camera) and prim.GetName(): | |
# if filter in prim.GetPath().pathString: | |
# cameras[prim.GetName()] = prim.GetPath().pathString | |
# return cameras | |
# cameras = _get_cameras(stage, '/rig/') | |
# for camera in cameras: | |
# print(cameras[camera]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment