Describe the bug
If I export maya mesh shapes which are instanced using exportRoots, the MayaExportedInstanceSources is not included. I must use selection=True to get the expected behaviour.
Steps to reproduce
- Open attached maya scene which contains 3 cube instances under an export group, and a "master" (instance 0?) outside of the group
- Run the below script to export the "Instances" group in both ways
- Observe that the exportRoots export does not include the instance source
Expected behavior
Expect the instance source to be incliuded under over "MayaExportedInstanceSources" in the usd file
Attachments
instance_references.zip

import maya.cmds as cmds
node = "Instances"
with_sel_usd = os.path.join(os.environ["TEMP"], "with_selection.usd")
with_roots_usd = os.path.join(os.environ["TEMP"], "with_exportroots.usd")
# Good
cmds.select(node)
cmds.mayaUSDExport(
f=with_sel_usd,
defaultUSDFormat="usda",
defaultPrim=node,
selection=True,
)
# Bad
cmds.select(None)
cmds.mayaUSDExport(
f=with_roots_usd,
defaultUSDFormat="usda",
defaultPrim=node,
exportRoots=[node],
)
Specs (if applicable):
- Windows 11
- Maya 2024
- maya_usd 0.35
Additional context
There is a related MR and Issue here:
#4118
#4073
But I beleive that is refereing to point instancing rather than scenegraph instances
Describe the bug
If I export maya mesh shapes which are instanced using
exportRoots, the MayaExportedInstanceSources is not included. I must useselection=Trueto get the expected behaviour.Steps to reproduce
Expected behavior
Expect the instance source to be incliuded under
over "MayaExportedInstanceSources"in the usd fileAttachments

instance_references.zip
Specs (if applicable):
Additional context
There is a related MR and Issue here:
#4118
#4073
But I beleive that is refereing to point instancing rather than scenegraph instances