BigRoy / usd-qtpy

Python Qt components for building custom USD tools.
MIT License
57 stars 8 forks source link

Maya USD: `PrimSpec.referenceList.GetAppliedItems()` fails #29

Closed BigRoy closed 7 months ago

BigRoy commented 7 months ago

Issue

It seems that the USD version in Maya - even in a recent release - has some API incompatibilities with functions we're now using. In particular this code

It seems that PrimSpec.referenceList.GetAppliedItems() does not exist in the USD api that comes with Maya, likely due to an older version of USD being used.

It might be worth looking into other options to mimic the logic of GetAppliedItems.

It seems that for example this logic does work:

            applied = prim_spec.referenceList.ApplyEditsToList([])
            for reference in applied:
                references.append(reference)
            applied = prim_spec.payloadList.ApplyEditsToList([])
            for payload in applied:
                payloads.append(payload)

So that we can be a bit more backwards compatible.