-
Notifications
You must be signed in to change notification settings - Fork 203
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-125954] Expose command/interface to indicate which variant to select on import of USD #2685
Comments
admin action - internally logged as MAYA-125954 |
To add to this, I imagine there could be a
Example:
Not completely sure how |
Would there be a major benefit using a dict over a flat repeatable tuple of (prim_path, variant_set, variant)? e.g. |
I think your example is just as valid. |
The tuple approach may be better than a dict to maintain order for nested variant sets (at least in python 2.7) usd primspec paths specify variants like this: |
@tanant It looks like this has been addressed in Maya-usd 0.21.0 USD import command support prim variants #2703
I'll have to test it after updating to the latest plugin. |
So I was able to test the primVariants option and it did work as advertised. Here is a snippet of how it was run, using Maya 2023 and Maya-usd 0.21.0 primVariants=[("/prp_barrel_master", "geom", "small"), ("/prp_barrel_master", "look", "default")]
cmds.mayaUSDImport(
file=assetusd_path, primPath="/", primVariant=primVariants,
shadingMode=[["useRegistry","UsdPreviewSurface"],["displayColor","standardSurface"]],
) This will make certain workflows more viable on my end, glad this made it in. Cheers, Jason Coelho |
Nice! Thank you for validating that @jcoelho88 I will go ahead and close this ticket out for the time being. |
Originally discussed in #2214
Opening new issue to capture the work. On import, the UI provides a way to select the particular variants desired, and it'd be good to provide a similar capability for the file importer so that loads and imports can pick correct variant without needing to open the UI up.
Note - this is specifically for the pathway where the USD stage is imported into the maya data model (i.e. translated to native maya, not the other pathway where we keep it as USD).
Originally posted by jcoelho88 March 23, 2022
Hello,
I want to be able to import my USD assets with variant selection via python.
When importing with the import dialog there is a option to open a hierarchy view and select the variants on what ever prim you want.
The command pops up in the script editor when its ran but I do not see how any of the options chosen in the Hierarchy view is being applied.
Currently an import command I use could look like this.
How do I include the options for variant selection on specific prims via the python import command?
Any help would be appreciated.
Cheers,
Jason Coelho
The text was updated successfully, but these errors were encountered: