set HIK character source via mel


#1

Hello!
tried to set HIK character source animation to “None” via mel command as i did here
mayaHIKsetCharacterInput( “Bob:TRIG”,“Character1” );

mayaHIKsetCharacterInput( “{0}:TRIG”,“None” );
mayaHIKsetCharacterInput( “{0}:TRIG”,“none” );
mayaHIKsetCharacterInput( “{0}:TRIG”,0 );

these give me an error
checking that function in maya/scripts/others/hikInputSourceUtils.mel didn’t help either. Looks like this function needs character specified. i assume it should be another one that sets input to “none” , but have no idea which. There is function “hikSetStanceInput” for setting it to “Stance”, but no function for “None”
does anyone know how to set character input to “None” ?
Thanks


#2

I just figure this out. This will work if you want to change to an other rig :

mayaHIKsetCharacterInput( “{0}:TRIG”, “ otherRig” ) ;

If you want to get the “None”, you need to reach the HIK UI. :

from maya import mel
from maya import cmds

uiss = cmds.lsUI ( l = True, type = “optionMenuGrp”)

for ui in uiss :
if “hikSourceList” in ui :
uiHikSource = ui

cmds.optionMenuGrp (uiHikSource, e= True, value = " None" )
mel.eval(‘hikUpdateCurrentSourceFromUI()’)
mel.eval(‘hikUpdateContextualUI()’)

with this, your source will become “None” :slight_smile: