Replies: 2 comments 4 replies
-
Hi @jhultgre, Currently we don’t have a way to import custom attributes from USD to Maya data. That’s why you don’t see them in the attribute editor. We do have a way to bring in metadata on import through our import command MayaUSDImport with the flag, -metadata (which takes multi strings). Since in Maya we don’t have the notion of metadata, we add the prefix ‘USD_’ and import it as a Maya custom attribute. We then use this prefix to differentiate from attributes when exporting and export this info back as USD metadata. The -metadata flag is defaulted to ‘hidden, instanceable, kind’. This is why you are seeing ‘USD_kind’ showing up in the Attribute Editor as a custom attributes. As for bringing in custom attributes on import, we do have a design for this. Here it is below. It would be an option as part of the ‘File Type Specific Options’ when selecting ‘USD Import’ on File – Import. ‘Include Attributes’ would be defaulted to ‘None’ as is the current behavior. In case our customers have an abundance of custom attributes, we think that defaulting this option to none is the safest. The second option is ‘All’, in which case we would import all custom attributes. The third option is ‘Custom’ where we let users specify which fields they’d like to import specifically. We would also have a flag for the MayaUSDImport command as well. The label ‘Include Attributes’ would have a tooltip educating the user of its function in more depth. What are your thoughts on this design? Would this solve your problem? Do you have any suggestions? Does the default of 'None' make sense? I want to add that we also have a very similar design for ‘Include Metadata’. This design clarifies what is happening under the hood with the ‘USD_’ prefix as I explained above. If you’re interested in this, can you please start another Discussion thread? |
Beta Was this translation helpful? Give feedback.
-
@jhultgre, if your custom attributes on the prim were defined by an API schema, we have a flag for MayaUSDImport, -apiSchema, which takes multi-strings. See details here: https://github.com/Autodesk/maya-usd/blob/dev/plugin/pxr/doc/README.md. So I wasn't correct when I said we don’t have a way to import custom attributes from USD to Maya data. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to add a custom attribute to my usd prims with usd core.
Is there a way to have that show up in the attribute editor when I load the scene as maya data?
I see USD_kind showing up.
Beta Was this translation helpful? Give feedback.
All reactions