Is HumanIK accessible to MEL?

Is HumanIK accessible to MEL?

Anonymous
Not applicable
2,740 Views
7 Replies
Message 1 of 8

Is HumanIK accessible to MEL?

Anonymous
Not applicable
Does anyone know if the new HumanIK retargeting system is fully script accessible? I've been trying to find if there's a way to batch process transfer one characters animations to another character. The major roadblock I've run into so far is that there doesn't seem to be a HumanIK equivalent to the old 'retarget' mel command. I tried turning on Echo All Commands and hitting 'Apply Retargeting' but no userful command showed up in the script edtior, and I can find nothing in the documentation about HumanIK.

Any help would be appreciated,
-Mike
0 Likes
2,741 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
I didn't see any new commands for HIK, but did you look at others/characterPipeTool.mel?
0 Likes
Message 3 of 8

Anonymous
Not applicable
Ah, thanks! Based on that script it looks like their function changeCharacterInput is a good starting point for me to look at. Too bad there's no documentation for it. 😕
0 Likes
Message 4 of 8

Anonymous
Not applicable
hi Mike,

We are looking at batching the retargeting process as well. Did you find anything in the others folder?
Did the proc. changeCharacterInput helped you out?

Thanks,

Marc
0 Likes
Message 5 of 8

Anonymous
Not applicable
Never mind, I found it 🙂

Cheers,

Marc
0 Likes
Message 6 of 8

Anonymous
Not applicable
Hey, I am having the same problem, how did you figure it out?
I am trying to script the retargeting, but I cant seem to figure out how to change the Retarget Input in the character pipe tab in the HumanIK UI.
I have found and am inside the characterPipeTool.mel, and I know these lines have something to do with it:

"global proc changeCharacterInput(string $pCharacter, string $pNewCharacterSrc,string $layerName,string $controlRigLayerName)"
{

please help
0 Likes
Message 7 of 8

Anonymous
Not applicable
this is the only place on the magical internet that comes close to addressing this issue/question.

can somebody please help out, I know u guys know whats up
0 Likes
Message 8 of 8

Anonymous
Not applicable
Sorry, hadn't checked this board in awhile. After digging deeply into this problem, I was eventually able to write a complex, batachable animation transfer system for our game. Its been a few months, but here's the relevant code IIRC (in Python):



import maya.cmds as mc
import maya.mel as mel

mel.eval("displayHIKPipeUI;") ### show the HIK window
mc.optionMenu("gCharPipeCharList",e=True, value=RigName) ### sets the source character
mel.eval("changeCurrentCharacter(\"gCharPipeCharList\" )")

mc.optionMenu("gCharPipeCharInputList",e=True,sl=2) #### sets the 'retarget input' option menu. Had to be done via index rather than name

mel.eval("changeCharacterInputFromUI;") ### applies the animation to the target character

mc.deleteUI("hikRetargetWindow")## delete the HIK window





In mel, the retarget input change line is:

optionMenu -e -sl 2 "gCharPipeCharInputList"


Basically, to make it work, I had to do a little hackery. First I load in both HIK rigs (not in the code above). Then, I show the HIK window and have the script change the retargeting input option menu directly. Note that I had to use the index of the character to change it to (in this case 2), not the name. After that I apply the retargetting and delete the window. A little goofy, but it works well.

Hope this helps,
Mike
0 Likes