Maya Python HIK - Switch Source to None

Hi,

I’m looking for a way to change a HIK characters Source to None. I was able to find hikSetStanceInput , mayaHIKsetRigInput , and mayaHIKsetCharacterInput. But unable to find a command for changing the source to None.

Anyone know how to do this?

Thanks!!

image|513x259image

From memory;
You’ll need to show the UI.
Change the relevant dropdown to none.
Trigger a callback (replicating the UI)

I think I did this with a UI context manager (show UI on enter, close on exit).

I might have missed something though so don’t assume this is the best way :slight_smile:

it’s a bit of a pain as you have to source all the mel dependencies, hikGlobalUtils, hikInputSourceUtils
then you can switch the connections like this:

    mel.eval('hikSetCurrentCharacter %s' % hikNode)
    mel.eval('hikUpdateCharacterControlsUI 1')

We do this in the ProPack when we’re dealing with HIK binding. If anybody knows a better way I’d love to know

cheers
Mark

I’ve been having trouble with this too and have been using:

mel.eval('hikEnableCharacter("CCR", 0)')
mel.eval('hikUpdateSourceList()')

but it doesn’t work on referenced characters.
Going through the UI works for me using @ldunham1 method, but I can’t get your method to work @Mark-J - seems to get stuck in Stance mode no matter what I do.

Incidentally, I’m looking to do this via maya.standalone on a number of files so looking for a non-UI based solution as I’m guessing that’s not going to work.