[MTOA-1207] Maya-usd "Arnold" Job context fails when using large assets
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
**Describe the bug**
I have an asset that's about 700MB and when trying to export to USD using the Maya-usd plugin the process never finishes or will crash. It can take over an hour for the crash.
The process will output messages in the script editor, it repeats over and over:
\# Exporting Arnold Scene...
Eventually after about 40 minutes it starts outputting this message:
Maya command error
While the process is running my memory spikes and the computer goes into swap.
**Steps to reproduce**
1. Load a large surfaced (with Arnold Shaders) asset of around 700MB or higher.
2. Select the asset and chose Export Selection under the file menu
3. Select USD Export and use the Arnold Job context option.
4. Try writing the file to disk.
**Expected behavior**
I have tested exporting without the Arnold job context and its written right away. The export using the Arnold-usd plugin also had no issues.
Expected behavior would be that the process complete like it currently does if I test with a much smaller asset.
**Specs (if applicable):**
Windows 10 Pro, Version 20H2, OS 19042.1706
64GB RAM
Maya 2023.1
Arnold 5.1.3.2
Maya-usd 0.18.0
**Additional context**
Example of what the command could be when exporting:
```python
cmds.file(
'.../PATH/TO/EXPORT/TEST', force=True, exportSelected=True, preserveReferences=True, type='USD Export',
options=";exportUVs=0;exportSkels=none;exportSkin=none;exportBlendShapes=0;exportColorSets=1;"
"defaultMeshScheme=catmullClark;defaultUSDFormat=usdc;animation=0;eulerFilter=0;staticSingleSample=0;"
"startTime=1;endTime=1;frameStride=1;frameSample=0.0;parentScope=;exportDisplayColor=1;"
"shadingMode=none;exportInstances=1;exportVisibility=1;mergeTransformAndShape=1;stripNamespaces=1;"
"jobContext=[Arnold]"
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.