Describe the bug
I'm building a small tool which prompts the user when referencing a usd with variants to the maya reference editor. The idea behind this is to be able to create separate rigs for each possible variant. When using the reference editor ui you have the ability to select the specific variant. But through code with the correct arguments it somehow doesn't come through.
Steps to reproduce
Steps to reproduce the behavior:
- create a usd prim with variants
- in the script editor create a function that references the usd to the reference editor:
import maya.cmds as cmds
filepath = "path to usd"
cmds.file(filepath, type= "USD Import", reference=True, options="unit=False;primVariant=['{/primpath}', '{variantSet}', '{variant}']")
Expected behavior
The usd file should be referenced to the reference editor with the correct variant.
When using the cmds.mayaUSDImport command with these arguments it does properly work.
Not sure if this workflow is even supported/advised in the first place. But we're used to work this way with referencing Alembics and figured the same should theoretically work for USD.
Specs (if applicable):
- Rocky 9.5
- Maya2026
- MayaUsd 0.3.4
Describe the bug
I'm building a small tool which prompts the user when referencing a usd with variants to the maya reference editor. The idea behind this is to be able to create separate rigs for each possible variant. When using the reference editor ui you have the ability to select the specific variant. But through code with the correct arguments it somehow doesn't come through.
Steps to reproduce
Steps to reproduce the behavior:
import maya.cmds as cmds
filepath = "path to usd"
cmds.file(filepath, type= "USD Import", reference=True, options="unit=False;primVariant=['{/primpath}', '{variantSet}', '{variant}']")
Expected behavior
The usd file should be referenced to the reference editor with the correct variant.
When using the cmds.mayaUSDImport command with these arguments it does properly work.
Not sure if this workflow is even supported/advised in the first place. But we're used to work this way with referencing Alembics and figured the same should theoretically work for USD.
Specs (if applicable):