I think this changes what thr function is supposed to be used for.
THe c++ impl reads.
bool IsValid() const {
if (!UsdIsConcrete(_type) || !_prim)
return false;
if (_type == UsdTypePrim)
return true;
SdfSpecType specType = _GetDefiningSpecType();
return (_type == UsdTypeAttribute &&
specType == SdfSpecTypeAttribute) ||
(_type == UsdTypeRelationship &&
specType == SdfSpecTypeRelationship);
}
- The object must be concrete (not abstract / schema-only)
- There must be a defining authored spec
- If it’s a Prim → valid immediately
- If it’s an Attribute → defining spec must be Attribute
- If it’s a Relationship → defining spec must be Relationship
Current
self.stage.prim_index(&self.path).is_some()
seems to not check spec.
I think this changes what thr function is supposed to be used for.
THe c++ impl reads.
Current
seems to not check spec.