Open mrawde opened 2 years ago
heya @mrawde - seems legit, were you able (or planning) to put a patch in for this one?
Hey @tanant. I was just filing this as something I noticed when trying to use the UsdMayaSchemaApiAdaptor
. I don't have a good idea on how to fix this.
Describe the bug it would be nice if the schema adaptor didn't create attributes that it didn't need to.
When adding an adaptor for MeshLightAPI for PxrMeshLight, we noticed that many attributes end up being created without values.
The schemaAdaptor->GetAttribute(attrName) ends up creating the attribute. But then if attrAdaptor.Get(&value) fails, we end up with an attribute without any value.
Steps to reproduce Here's a script you can run to reproduce the issue
Expected behavior I'd expect the script above to run without getting the assertion error.
The resulting usd looks like
I'd expect only inputs:exposure to be present (which is what the assert is testing).