NVIDIA / warp

A Python framework for high performance GPU simulation and graphics

Home Page:https://nvidia.github.io/warp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usd renderer using lowercase

cadop opened this issue · comments

I think it would be good to change:

self.up_axis = up_axis

to

     self.up_axis = up_axis.upper()

and use capitals here:

if up_axis == "x":

USD doesn't like lowercase, and this caused an issue for awhile when I was trying to render with warp. For example, this modification to the sphere fails

        if not instancer:
            if colors is None:
                instancer = UsdGeom.PointInstancer.Define(self.stage, instancer_path)
                
                # Create a capsule instead of a sphere
                instancer_capsule = UsdGeom.Capsule.Define(self.stage, instancer.GetPath().AppendChild("capsule"))
                instancer_capsule.GetAxisAttr().Set(self.up_axis)
                

because GetAxisAttr() expects capital, but warp expects lowercase.

Ah, thanks @cadop - sounds like a good change. @eric-heiden .

@cadop Thanks for reporting this, the up_axis parameter will be in upper case in the next release.