Blending (dont switch form 0 to 1 or vice versa but do it under a afew frames). Ive seen rigs and done that can switch between ik annd fk and them move the bones in equal position. Initself this sis noit hard to achieve.
Yeah i know what prompted you guys to search this ist the mouse rig. (what he does is he shows the switching but not what it can blunder to in animation time).
However this has a problem, the dervate of the position is not accounted for in most cases... it would be possible to add this but its not often neccesery if the animator understands that he must match the speed himself. Even tough ive seen 4 succesfull production rigs that have this i dont purehartedly suggest it (2 of wich were mine). Its prone to problems that the blending solution does not have.
But yeah all you need to do is make either a a scriptjob and or expression to monotor this. Now both methods have their advantages, here i usualy prefeer a scripjob since the switching is usaly only done by the user. Now the tricky part here is to ensure proper keying, so remind your animators they must key at theese points. you could force a key but animators usualy consider that tacky and breaking the testing of poses.
Note by the way that its pretty easy to move form ik to fk, but the other way around is more problematic. Indeed there are situations whare fk just can do things the ik will NOT do. Infact one nasty problem occours whan the user wants to go fk, then decides not to and moves back to ik and hes possibly screwed all up, unless he does it by undoing.*
basicaly the step goes like this, monitor the change of the switch attribute by scriptjob, if change set the bones position or the ik efflectors position so that the bone is exactly in same place using mel.
Theres another problem yoou may encounter because fk can put in values ik cannot with motionblur in soem cases. This is a realy nasty one to fix transparently... offcourse doing it rendertime nou prob
- also pleas pelase advice the animator agains positioning in fk and convering the pose to ik for interpolation between poses.