hey there,
I'm back again with another problem I'm having which I cannot find an answer for on the Internet so I need your help again.. I'm trying to create a little script to help me creating simple symetrical objects by creating a mirrored base object.
But I'm stuck on not being able to select certain edges to do operations on. I have the feeling I cannot do what I want because MEL scripting is not object orientated, but how can I select faces/edges on objects stored in variables?
string $newcube[] = `polyCube -w 10 -h 10 -d 10 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1`; // create new cube<br>objectMoveCommand;<br>select -r $newcube[0].e[1]; //trying to select specific edge, how do i do this?<br>SelectEdgeRingSp;<br>ConnectComponents; //connect middle edges<br>select -r $newcube[0].f[0:3] $newcube[0].f[5] ;<br>doDelete; //delete faces on one side of cube<br>duplicatePreset(1,0,1,0,0,0,0,0,0,0,0,0,0,0,-1,1,1); //duplicate special to create instanced mirror copy
Replies
select -r $newcube[0].e[1];
Like this:
select -r ($newcube[0] + ".e[1]");
And this for faces later:
select -r ($newcube[0] + ".f[0:3]") ($newcube[0] + ".f[5]");