Home Youtube GitHub

How to apply FK/IK match?


#1

Hi again Miquel

Another simple question for you. How does the animator apply FK/IK match. I only see FK/IK blend under the arm and leg controls.

Thanks
Gavin


#2

is in the synoptic view :wink:


#3

Is it? I don’t see it. Excuse my ignorance but this is my first time animating an mGear character rig, and it’s the first time my colleague rigged in mGear (and in a rush), so everything is new, and things have possibly not been set up correctly?

If it’s the buttons “IK/FK Arm left” etc, then when I left click these
Can’t find object : arm_L0_fk0_mth
Can’t find object : arm_L0_fk1_mth
Can’t find object : arm_L0_fk2_mth
Can’t find object : arm_L0_ik_mth
Can’t find object : arm_L0_upv_mth
Can’t find object : arm_L0_ikRot_mth
// Error: root : Uncaught exception
Traceback (most recent call last):
File “C:\Users\gavinm\Documents\maya\2017\modules\scripts\mgear\maya\synoptic\widgets.py”, line 121, in mousePressEvent
utils.ikFkMatch(model, ikfk_attr, uiHost_name, fks, ik, upv, ikRot)
File “C:\Users\gavinm\Documents\maya\2017\modules\scripts\mgear\maya\synoptic\utils.py”, line 600, in ikFkMatch
transform.matchWorldTransform(ikTarget, ikCtrl)
File “C:\Users\gavinm\Documents\maya\2017\modules\scripts\mgear\maya\transform.py”, line 537, in matchWorldTransform
sWM = source.getMatrix(worldSpace=True)
AttributeError: ‘NoneType’ object has no attribute ‘getMatrix’ //


#4

Looks like the rig is missing the nodes to help match the IK FK. Or can’t find it for some reason

Hard to say without checking the rig.

Check if rig have objects with the _mth suffix

I hope this helps


#5

Hello, Miquel.

I have the same issue with ik/fk match. It does not work only when i build rig with check-box “IK separated Trans and Rot ctl” in arm`s module settings is disabled.

I get this in script editor:

Can’t find object : arm_L0_ikRot_ctl
Can’t find object : arm_L0_ikRot_mth
# Traceback (most recent call last):
# File “C:\mgear\scripts\mgear\maya\synoptic\widgets.py”, line 121, in mousePressEvent
# utils.ikFkMatch(model, ikfk_attr, uiHost_name, fks, ik, upv, ikRot)
# File “C:\mgear\scripts\mgear\maya\synoptic\utils.py”, line 665, in ikFkMatch
# transform.matchWorldTransform(ikRotTarget, ikRotNode)
# File “C:\mgear\scripts\mgear\maya\transform.py”, line 537, in matchWorldTransform
# sWM = source.getMatrix(worldSpace=True)
# AttributeError: ‘NoneType’ object has no attribute 'getMatrix’

Thanks


#6

@Vasilii Sorry for the late reply.

yes the default configuration is for separated Trans and rotation controls.

You need to edit the template with qtdesigner and recompile again the .ui file

Just change the ikRot Value to None.

here is also a capture in from the python modules synoptic/widgets.py

sorry for the lack of documentation in this area.
I hope it helps. Please let me know if you need more help

cheers,
Miquel


#7

a quick workaround for this is also to navigate to the fk hand controller and under it you can duplicate the _ref group twice and rename it to the missing _mth and _ctl for each side.
then it works again.

with a bit af python knowledge, the mgear code could br modified so it can be implemented on creation time…