I am trying to add some options to my exporter via MEL. I get the following error when I try to open the Export dialog:
// Error: Object's name is not unique: BoxLayout //
My script (LSpiroModelsOptions.mel) looks like this:
/**
* Copyright L. Spiro 2009
* All rights reserved.
*
* Written by: Shawn (L. Spiro) Wilcoxen
*
* This code may not be sold or traded for any personal gain without express written consent. You may use
* this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact.
* You may not take credit for having written this code.
* If you wish to use this code in a commercial product contact yogurtemperor@hotmail.com.
*
* Description: Add options to the exporter.
*/
global proc int LSpiroModelsOptions( string $parent,
string $action,
string $initialSettings,
string $resultCallback ) {
// Return value.
int $bResult = 1;
if ( $action == "post" ) {
setParent $parent;
columnLayout -adj true lsmTypeCol;
string $modelOnly = (uiRes("m\_LSpiroModelsOptions.kModelOnly"));
string $modelAndAnims = (uiRes("m\_LSpiroModelsOptions.kModelAndAnims"));
string $animsOnly = (uiRes("m\_LSpiroModelsOptions.kAnimOnly"));
radioButtonGrp
-label (uiRes("m\_LSpiroModelsOptions.kAnims"))
-nrb 3 -cw4 175 75 75 75
-labelArray3 $modelOnly $modelAndAnims $animsOnly lsmAnims;
// Current settings.
$currentOptions = $initialSettings;
if ( size( $currentOptions ) > 0 ) {
tokenize( $currentOptions, ";", $optionList );
for ( $index = 0; $index < size( $optionList ); $index++ ) {
tokenize( $optionList[$index], "=", $optionBreakDown );
if ( $optionBreakDown[0] == "anims" ) {
if ( $optionBreakDown[1] == "0" ) {
radioButtonGrp -e -sl 1 lsmAnims;
}
if ( $optionBreakDown[1] == "1" ) {
radioButtonGrp -e -sl 2 lsmAnims;
else {
radioButtonGrp -e -sl 3 lsmAnims;
}
}
}
}
$result = 1;
}
return $bResult;
}
I am registering it in this way:
mStatus = mpPlugin.registerFileTranslator( "L. Spiro Models",
"",
MPI\_CharExport::creator,
"LSpiroModelsOptions",
"anims=0;" );
Any ideas why I am getting this error? I can not see any non-unique control names.
Thank you,
L. Spiro