MEL Script Error:// More than one object matches name

MEL Script Error:// More than one object matches name

Anonymous
Not applicable
2,811 Views
1 Reply
Message 1 of 2

MEL Script Error:// More than one object matches name

Anonymous
Not applicable
I am trying to place around 60 objects all at once on a globe in maya, they are pin points that are mapped out to latitude and longitude lines, i have all the code generated but when i paste it into the MEL script editor i get a "//Error: More than one object matches name: Mother_Text" i will attach part of my code at the bottom of this to show you the code i am using, i am wondering if there is a way to do a code break in between line7 and 8 to basically start generating again in the code. i really dont want to have to paste 60 different versions of this code just to get this to work, and this is phase 1, next would be doing almost 1000 place markers and it gets a little crazy after that, can anyone help?




select -r Mother_Text ;
setAttr -type "string" textForBevel2.text "Dubai";
select -r PURE_MOTHER_LON ;
duplicate -rr;
rename "PURE_MOTHER_LON1" "Dubai";
setAttr "Dubai.rotateY" 55;
setAttr "Dubai|LAT_Move.rotateX" 65;
select -r Mother_Text ;
setAttr -type "string" textForBevel2.text "Geneva";
select -r PURE_MOTHER_LON ;
duplicate -rr;
rename "PURE_MOTHER_LON1" "Geneva";
setAttr "Geneva.rotateY" 6.139959;
setAttr "Geneva|LAT_Move.rotateX" 43.796188;
0 Likes
2,812 Views
1 Reply
Reply (1)
Message 2 of 2

tkaap2
Autodesk
Autodesk
Is the object Mother_Text in a group, or perhaps a shape node? That sounds like an error that Maya gives when you're specifying an object by a non-unique identifier, such as just using the node's name rather than a path to the object. If you have one node 'group1|Mother_Text' and another node 'group2|Mother_Text', Maya will give you that error if you try to select 'Mother_Text'

Plus, it's probably safer to "capture" the output of the duplicate method and use that data, rather than trusting that the new node will be named PURE_MOTHER_LON1. It's easier to debug that way, too.

Is there a version of the file that you can post here? Perhaps you can strip out the geometry and just leave in some locators with the same names as your pin points that you're duplicating. As long as you still get the same error, it's probably enough that someone can help you make sense of the problem.

In the Command menu of the Script Editor, turn on "Line numbers in errors" to verify that the 'select -r Mother_Text' line is the line causing the error.
0 Likes