USD Attribute as Key-Value Dictionary

   1593   2   1
User Avatar
Member
235 posts
Joined: Oct. 2014
Offline
What's the secret to creating a USD Attribute of Key-Value Dict type? Tried a few USD attr types including string/string array and while the parm UI updates to show the table (using an Edit Property LOP), the actual attribute on the prim fails to be set correctly, with the only error being “Failed to set attribute: <whatever type I try>”.

Is there a trick to defining an attribute type as a key:value dict?
Edited by Tim Crowson - Oct. 19, 2020 13:18:25
- Tim Crowson
Technical/CG Supervisor
User Avatar
Staff
4435 posts
Joined: July 2005
Offline
As described here: https://graphics.pixar.com/usd/docs/api/_usd__page__datatypes.html [graphics.pixar.com] USD Attributes do not support dictionary types. If you want an explanation for why a particular Edit Property LOP is failing, please post a hip file. I don't really understand what you're referring to when you say “the parm UI updates to show the table”…
User Avatar
Member
235 posts
Joined: Oct. 2014
Offline
Not able to post a hip file, sorry. But if USD doesn't support it, that explains it.

Repro steps for the record:
1. Create an Edit Properties LOP and point it a prim
2. Click Edit Properties
3. Add a USD String Attribute (though the type of attribute you add may not really matter)
4. In the “Parameter Description” area set its type to “Key-Value Dictionary” and click Apply.
5. The Edit Properties LOP UI will now have a dictionary table added, but the node will be errored out.

Thanks for the link. Sounds like USD customData might serve my purpose.
Edited by Tim Crowson - Oct. 20, 2020 11:06:49
- Tim Crowson
Technical/CG Supervisor
  • Quick Links