-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-104134 Add .usdz extension to the identifyFile function #396
Conversation
…s used to determine if it is a supported file when doing a drag'n drop onto Maya.
I enabled .usdz import here: #313 When a user drops a .usdz file on top of Maya to import it, Maya will call all the translators to see if they identify the file as something they understand. This function was still parsing the file string to get the extension and then comparing against .usd/.usda/.usdc and not .usdz. The pxr plugin has this exact code so it will also not import a .usdz when you try to drop it on Maya either. I can add the exact same line there, or we can leave it as a mayaUSD only thing if we want. |
Is this something that can be factored out easily into the mayaUsd/lib core and used across multiple plugins, or is it a bit more involved? |
It could be. Right now the common code that is used by multiple plugins are the "job" classes down in the lib but this code is up in the translators. The translators, defined in each plugin, set things like the default options or what extensions they can support, but they all derive directly from MPxFileTranslator. For the commands I'm actually creating a new base command class that the others derive from so they can customize just the things that are different. We could do that here as well but I have not planned for that refactoring yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @fowlertADSK! Looks good to me!
If it's not too much trouble, it would be great to add this for the Pixar plugin also:
https://github.com/Autodesk/maya-usd/blob/dev/plugin/pxr/maya/lib/usdMaya/importTranslator.cpp#L122
Done. |
Add .usdz extension to the identifyFile function, which is used to determine if it is a supported file when doing a drag'n drop onto Maya.