Hello
I open a similar subject to this but it was in the wrong place so this is my problem.
I have a textScrollList contain the name of some selected object from my scene. i want to export the selection into a text or ma file. this is what i write. it seem to be working but my problem is that i got in the exported file the name of the first object in my textScrollList. i can specify if i want the first or the second name … but i want all the name in my exported file.
global proc ExportSmartSelected()
{
fileBrowserDialog -m 1 -fc "SaveList" -ft "mayaAscii" -an "Save Text File" -om "SaveAs";
}
global proc int SaveList( string $filename, string $fileType )
{
$fileId=`fopen $filename "w"`;
string $SmartNameSel [] = `textScrollList -q -si SmartWindow`;
$SmartNameSelOne = $SmartNameSel [0] ;
fprint $fileId $SmartNameSelOne;
fclose $fileId;
return 1;
}
when i change $SmartNameSel [0] to $SmartNameSel [1] for exemple i got the name of the second element in my textScrollList. and this is not what i want. i look to have all the name.