Problem summary When exporting multiple objects with the same name using the ScenegraphXML, the script will exit and throw the following exception:
---------- # Error: line 1: ValueError: file C:/Users/KATANA2/Documents/maya/2017/scripts\ScenegraphXML\maya2scenegraphXML.py line 570: More than one object matches name: cone1 # ----------
Customer reported version Katana3.0v1
Customer reported platform n_a_windows
Steps to reproduce
1) Download the attached MayaScenegraphXMLRepro.zip file
2) Setup the Maya plugin environment variable to the ScenegraphXML folder within the zip file.
2) Open the toMayaPrimitives.ma in Maya
3) Within Maya, edit the cylinder to be named 'cone1'
4) Within the Maya script editor, copy the toKatana.py script and execute it.
Result: You will receive the following exception:
---------- # Error: line 1: ValueError: file C:/Users/KATANA2/Documents/maya/2017/scripts\ScenegraphXML\maya2scenegraphXML.py line 570: More than one object matches name: cone1 # ----------
Workaround Option 1: ( Temporary ) We found that the error More than one object matches name comes from the Maya function cmds.listAttr, which is complaining about an ambiguous instruction. The export works when you also specify the parent of the relevant objects in maya2scenegraphXML.setComponent.
As an example, for the Maya scene attached to the zip file provided, edit toKatana.py with the following: