for($i=1; $i<5; $i++) { float $controlRangeValue = `getAttr Control.Range`; setAttr ("pCube" + $i + ".translateY") $controlRangeValue; }
for($i=1; $i<5; $i++) { connectAttr Control.Range ("pCube" + $i + ".translateY"); }
// This is pretty basic listing that stores ALL objects user selected // with no filters or checks // so select the right objects or write more code >.> string $objList[] = `ls -sl`; float $range = `getAttr "Control.range"`; for ( $obj in $objList ){ setAttr ($obj + ".translateY") $range; }
string $objList[] = `ls -sl`; for ( $obj in $objList ){ connectAttr "Control.range" ($obj + ".translateY"); }