load usd variants through Maya reference editor
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
**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:
1. create a usd prim with variants
2. 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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.