Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //fk 2 ik
- string $shoulderCON[] = `listConnections #.shoulderCON`;
- string $elbowCON[] = `listConnections #.elbowCON`;
- string $wristCON[] = `listConnections #.wristCON`;
- string $shoulderJoint[] = `listConnections #.shoulderJoint`;
- string $elbowJoint[] = `listConnections #.elbowJoint`;
- string $wristJoint[] = `listConnections #.wristJoint`;
- string $armCON[] = `listConnections #.armCON`;
- int $time = `currentTime -q`;
- currentTime -edit ($time - 1);
- setKeyframe ($shoulderCON[0] + ".rotate");
- setKeyframe ($elbowCON[0] + ".rotate");
- setKeyframe ($wristCON[0] + ".rotate");
- setKeyframe ($armCON[0] + ".ik");
- currentTime -edit $time;
- float $shoulder[] = `xform -q -ws -ro $shoulderJoint[0]`;
- float $elbow[] = `xform -q -ws -ro $elbowJoint[0]`;
- float $wrist[] = `xform -q -ws -ro $armCON[0]`;
- xform -ws -ro $shoulder[0] $shoulder[1] $shoulder[2] $shoulderCON[0];
- xform -ws -ro $elbow[0] $elbow[1] $elbow[2] $elbowCON[0];
- xform -ws -ro $wrist[0] $wrist[1] $wrist[2] $wristCON[0];
- setKeyframe ($shoulderCON[0] + ".rotate");
- setKeyframe ($elbowCON[0] + ".rotate");
- setKeyframe ($wristCON[0] + ".rotate");
- setKeyframe ($armCON[0] + ".ik");
- //ik 2 fk
- string $shoulderJoint[] = `listConnections #.shoulderJoint`;
- string $wristCON[] = `listConnections #.wristCON`;
- string $armCON[] = `listConnections #.armCON`;
- string $poleCON[] = `listConnections #.poleCON`;
- string $PV_LOC[] = `listConnections #.PV_LOC`;
- int $time = `currentTime -q`;
- currentTime -edit ($time - 1);
- setKeyframe ($armCON[0] + ".translate");
- setKeyframe ($poleCON[0] + ".translate");
- setKeyframe ($armCON[0] + ".ik");
- currentTime -edit $time;
- float $fkPOVLoc[] = `xform -q -ws -t $PV_LOC[0]`;
- float $wristRot[] = `xform -q -ws -ro $wristCON[0]`;
- float $wristPos[] = `xform -q -ws -t $wristCON[0]`;
- xform -ws -t $wristPos[0] $wristPos[1] $wristPos[2] $armCON[0];
- xform -ws -ro $wristRot[0] $wristRot[1] $wristRot[2] $armCON[0];
- xform -ws -t $fkPOVLoc[0] $fkPOVLoc[1] $fkPOVLoc[2] $poleCON[0];
- setKeyframe ($armCON[0] + ".translate");
- setKeyframe ($armCON[0] + ".rotate");
- setKeyframe ($poleCON[0] + ".translate");
- setKeyframe ($armCON[0] + ".ik");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement