options

I am working on a translator for Maya and I wanted to write a seperate MEL script for the options. The problem I am having is that, Maya recognizes the script but I get an error so I never get to see my options. The error is as follows: "Error: Object's name is not unique: BoxLayout". I looked at other options scripts and I can't pin down the source of error.

Thanks,
Jakub

Can you show the section of your code where the window's title and the internal reference name of the window is declared?

columnLayout -adj true optsExportObjects;
radioButtonGrp
-l "Lights"
-nrb 2
-cw3 175 75 75
-la2 "yes" "no"
optLights;
radioButtonGrp
-l "Materials"
-nrb 2
-cw3 175 75 75
-la 2 "yes" "no"
optMaterials;

Here's the sampel code from the docs for making a window

string $window = window -title "Long Name"
-iconName "Short Name"
-widthHeight 200 55 NewWindow
;
columnLayout -adjustableColumn true;
button -label "Do Nothing";
button -label "Close" -command ("deleteUI -window " + $window);
setParent ..;

showWindow $window;

If you remove "NewWindow" you can have as many copies of this as you want open as maya will generate a new name for every winodw otherwise you can only launch one NewWindow at a time.

Well, I'm not making a new window, this is merely for the options dialog box you get when you go to export something. I shouldn't have to bother with the window at all. I've even looked at the mel scripts done for other translators and there isn't anything about window in all of them.

well if you haven't accidentally called two different controls "BoxLayout" the only thing I can think of is that you've forgotten the -e or -q flag on a line refering to "BoxLayout", so your script thinks you want to create "BoxLayout" again when really you meant to query or edit "BoxLayout"...? This happened to me once before at least...

:nathaN