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

IsInert reports false on empty variant PrimSpecs since v0.21.5 #1652

Closed
jonjondev opened this issue Oct 11, 2021 · 1 comment
Closed

IsInert reports false on empty variant PrimSpecs since v0.21.5 #1652

jonjondev opened this issue Oct 11, 2021 · 1 comment

Comments

@jonjondev
Copy link

Description of Issue

Pre-v0.21.5, SdfSpec::IsInert could be used to check whether a variant brought in any opinions on a variant PrimSpec, where an empty variant would be considered "inert".

Since including required fields as part of SdfLayer::ListFields in commit b7648a6, this particular case will result in IsInert reporting that the variant is no longer inert (False).

@gitamohr requested for this to be filed as an issue on the USD Interest Group.

Steps to Reproduce

With the following file contents:

test.usda

#usda 1.0

over "test"
{
    variantSet "vars" = {
        "off" {
        }
        "render" (
            payload = @...@
        ) {
        }
    }
}

test.py

from pxr import Sdf
layer = Sdf.Layer.FindOrOpen("./test.usda")
layer.GetPrimAtPath("/test{vars=off}").isInert

isInert will report False under USD v0.21.5+, and True for any previous version.

@jilliene
Copy link

Filed as internal issue #USD-6960

lkerley pushed a commit to imageworks/USD that referenced this issue Jan 7, 2022
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

3 participants