global proc FNDvertexLine() { string $FNDStartVertexForLine[] = `ls -sl -fl`; string $FNDfirstVertex = $FNDStartVertexForLine[0]; string $FNDsecondVertex = $FNDStartVertexForLine[(`size $FNDStartVertexForLine` - 1)]; vector $FNDpointOne = `xform -ws -q -t $FNDfirstVertex`; vector $FNDpointTwo = `xform -ws -q -t $FNDsecondVertex`; eval ("curve -d 1 -p " + ($FNDpointOne.x)+" "+($FNDpointOne.y)+" "+($FNDpointOne.z) + " -p " +($FNDpointTwo.x)+" "+($FNDpointTwo.y)+" "+($FNDpointTwo.z) + " -n FNDhelperCurve;"); string $FNDforVertexLine; for ($FNDforVertexLine in $FNDStartVertexForLine) { select $FNDforVertexLine; vector $FNDPointXform = `xform -ws -q -t`; spaceLocator -n FNDHelpLocator; move ($FNDPointXform.x) ($FNDPointXform.y) ($FNDPointXform.z); select FNDhelperCurve; select -add FNDHelpLocator; geometryConstraint -weight 1; select FNDHelpLocator; vector $FNDPointXform = `xform -ws -q -t`; select $FNDforVertexLine; move ($FNDPointXform.x) ($FNDPointXform.y) ($FNDPointXform.z); delete "FNDHelpLocator" ; } delete "FNDhelperCurve" ; select $FNDStartVertexForLine; hilite -r `FNDObjName($FNDStartVertexForLine)`; } global proc string FNDObjName(string $names[]) { string $buffer[]; tokenize $names[0] "." $buffer; return $buffer[0]; }