Skip to content

Instantly share code, notes, and snippets.

@hiko9lock
Created November 26, 2013 15:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiko9lock/7660365 to your computer and use it in GitHub Desktop.
Save hiko9lock/7660365 to your computer and use it in GitHub Desktop.
Maya Mel script that instead of ikHandle command for MayaLT.
// file hq_ikHandle.mel
// Create ikHandle tool for MayaLT
// author Masahiko.Ishii <esuna.dev@gmail.com>
// date 2013/11/27
global proc hq_ikHandle()
{
string $sels[]= `ls -sl`;
string $ik= `createNode "ikHandle"`;
string $ef= `createNode "ikEffector"`;
select -r "ikSystem";
select -r $sels[1];
pickWalk -d up;
string $jnt[]= `ls -sl`;
parent $ef $jnt[0];
connectAttr ("ikSCsolver.message") ($ik+".ikSolver");
connectAttr ($ef+".handlePath[0]") ($ik+".endEffector");
connectAttr ($sels[0]+".message") ($ik+".startJoint");
connectAttr ($sels[1]+".tx") ($ef+".tx");
connectAttr ($sels[1]+".ty") ($ef+".ty");
connectAttr ($sels[1]+".tz") ($ef+".tz");
connectAttr ("ikSCsolver.message") ("ikSystem.ikSolver[0]");
}
hq_ikHandle;
@hiko9lock
Copy link
Author

When I create joints with create ik option that didn't work well.
usage:
Select start joint and end joint.
Then hq_ikHandle.mel drag&drop into mayaLT scene.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment