QUOTE(Shredder @ 04/29/09, 08:06 PM) [snapback]307023[/snapback]
yeah this is the first time I have needed it.. but it is needed in this instance
Make a script job*, anway Im not so sure you do need it.Because im pretty sure you do not. I have 10 years tried to find a single instance where this would be advisable. Ive found only one scenario, which is far more convoluted than just plain selection it also needs rerouting of attributes too, even so it can be solved far more elegantly in the api with a one very simple node. Would love to find one more but i doubt i will.
Take this example where you have a 2 spheres. You want the other to be a quick link into sphere 1 but dont want it to move with it. Yes you could fiddle with selections... but lo behold you can make them into one "object" (remeber objects dont exist its a illusion thus thats why i can do this). So if you knew you can do this then you can start thinking of rereouting selections, after a few more convoluted ideas dawn to you. Please note they ARE the same object as much as you can call anything objects in maya anyway:
QUOTE
// this will create a new scene so be sure to not have anything
// important in maya when you run this
file -f -new;
sphere -p 0 0 0 -ax 0 1 0 -ssw 0 -esw 360 -r 1 -d 3 -ut 0 -tol 0.01 -s 8 -nsp 4 -ch 1;
sphere -p 0 0 0 -ax 0 1 0 -ssw 0 -esw 360 -r 1 -d 3 -ut 0 -tol 0.01 -s 8 -nsp 4 -ch 1;
move -r 3 0 0;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;
parent -add -shape nurbsSphereShape2 nurbsSphere1;
//to distinguish them form one another in shaded mode
setAttr "nurbsSphereShape2.overrideEnabled" 1;
setAttr "nurbsSphereShape2.overrideShading" 0;
delete nurbsSphere2;
// now they are now the same object but lets amke the other independent
// note it could tie to other objects so a object doent need to be where
// its handle is, tough theres a easier way to do only that.
createNode transformGeometry;
connectAttr -f transformGeometry1.outputGeometry transformGeometry2.inputGeometry;
connectAttr -f transformGeometry2.outputGeometry nurbsSphereShape2.create;
connectAttr -f nurbsSphere1.worldInverseMatrix[0] transformGeometry2.transform;
Try to select the speheres in isolation (its possible) and move the other sphere separately (wont work not easily anyway, even if you group the things)
This just illustrates a bit convoluted i admit a very rarely used and rarely known fact of maya. They who know these can rarely come up with uses for it. But yes it can be used for a lot fo things. Such as having 2 or more different rig pieces drive same thing. To make selection easier especially in drag move mode.
*if you see yourself making scriptjob for other than a gui window your probably doing something wrong.