Bug exporting instances?
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
When trying to export a Maya node which has instances it looks like the resulting file is wrong when using the kwarg "exportRoots".
To test, you can create an scene with the code below:
```
import maya.cmds as cmds
s = cmds.sphere(r=10, name="instance")
lod_group = cmds.group(name="my_lod")
asset_group = cmds.group(name="my_asset")
for i in range(5):
inst = cmds.instance([s[0]], name=f"{s[0]}_{i}")
cmds.move(25 * (i + 1), 0, 0, inst[0])
```
Once you have the scene, export it with the following command:
```
cmds.mayaUSDExport(
asset_group, file="/tmp/instances_exportRoots.usda", exportDisplayColor=True,
kind="group", shadingMode="useRegistry", defaultPrim=lod_group,
convertMaterialsTo=["UsdPreviewSurface"], exportInstances=True,
exportCollectionBasedBindings=False, mergeTransformAndShape=True,
exportRoots=lod_group,
)
```
You can see that the resulting file does not have the geometry in it.
If now you try to run the command above without the "exportRoots" kwarg you will see that the resulting file has the proper geometry:
```
cmds.mayaUSDExport(
asset_group, file="/tmp/instances_no_exportRoots.usda", exportDisplayColor=True,
kind="group", shadingMode="useRegistry", defaultPrim=lod_group,
convertMaterialsTo=["UsdPreviewSurface"], exportInstances=True,
exportCollectionBasedBindings=False, mergeTransformAndShape=True,
)
```
Am I missing something here? Is this, for some reason, the expected behavior?
Thanks!
Specs:
- CentOS 7
- Maya 2023
- maya-usd/0.30
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.