Hi guys There's a piece of code i'm not sure how to write. Here's a small example of what i'm trying to achieve: I have two objects. They are parent constraint to each other. I'd like to write a piece of melscript to GET the name of the Parent object and load it into a Variable, if I have the child object selected. I'm…
I'm far from being a guru but perhaps this can point you in the right direction until someone else responds... This will identify a physical parent-child relationship. string $parent[] = listRelatives("-p",`ls -sl`);//or more simply put:string $select[] = `ls -sl`;$parent = `listRelatives -p $select`; This will find…
Oh yeah, sorry about that, was gonna write it differently(little cleaner) to run through your selection if you have multiple objects selected, but didnt finish it and forgot to clean out the line. this is what i meant to post, string $Sel[] = `ls -sl`; string $targetAttr = $Sel[0] +"_parentConstraint1.target"; string…
small update:) cleaned it up a bit, automated it so it should work with any type of constraint, and added a bit of error handling, string $mySel[] = `ls -sl`;if ($mySel[0] != "") { //list all constraints in the scene. string $Cons[] = `ls -type "constraint"`; string $Buffer[]; int $posArray; //find where in the array $Cons…