Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usd renderer using lowercase #143

Closed
cadop opened this issue Aug 21, 2023 · 2 comments
Closed

usd renderer using lowercase #143

cadop opened this issue Aug 21, 2023 · 2 comments

Comments

@cadop
Copy link
Contributor

cadop commented Aug 21, 2023

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.

@mmacklin
Copy link
Collaborator

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

@eric-heiden
Copy link
Contributor

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

@shi-eric shi-eric closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants