Exported Maya instances won't get material
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
**Describe the bug**
After exporting Maya instances to USD, mtl scope is created outside of MayaExportedInstanceSources, hence the following error upon opening the USD:
`// Warning: In : The relationship target from in layer @c:/hollov/cube_wio_root.usd@ refers to a path outside the scope of the reference from . Ignoring. (getting targets for relationship on stage @c:/hollov/cube_wio_root.usd@ <0000025E72CF1930>)`
Materials should be under each of the prototypes in order to instances successfully receive them.
I use Arnold job context, but the issue is the same without it as well.
**Steps to reproduce**
1. Create a cube and assign a shader to it (e.g. aiStandardSurface)
2. Create instances of this cube
3. Select every cube and export them into USD with materials (if you assigned Arnold shader then switch on Arnold job context)
**Expected behavior**
After opening the USD I'd like to see all the cube instances with their shaders in render.
But only the prototype cube has shader and none of the instances.
(BTW prototypes should be invisible by default but that's another issue).
**Attachments**

**Specs (if applicable):**
- OS Windows 10 Pro 22H2
- Maya version 2024.2
- Maya USD: `mayausd-0.31.0_202501281116-97cf933` AND `mayausd-0.32.0_202505060957-eeb3aaa`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.