Home Website Youtube GitHub

mGear 5.4: Eye Rigger fails on Maya 2022 – AttributeError: module 'math' has no attribute 'dist'

Hi,

after updating to mGear 5.4 I get an error when building the eye rig with the Facial Rigger 3.0.

Environment

  • mGear 5.4
  • Maya 2022
  • Windows

Steps to reproduce

  1. Open Rigbits > Facial Rigger3.0
  2. Set up the Eye Rigger as usual
  3. Click Build

Error
Traceback (most recent call last):

File “…/mgear/rigbits/facial_rigger3/rigger_tab.py”, line 69, in build
return self.rigger.rig(**self.form.get_settings())

File “…/mgear/rigbits/facial_rigger3/eye.py”, line 66, in rig
return _rig(get_settings(**kwargs))

File “…/mgear/rigbits/facial_rigger3/eye.py”, line 86, in _rig
geometry = eyelid_solver.solve(settings)

File “…/mgear/core/facial/eyelid_solver.py”, line 194, in solve
elif _inner_first(first, last, positions, aim is not None):

File “…/mgear/core/facial/eyelid_solver.py”, line 96, in _inner_first
width = math.dist(positions[first], positions[last]) or 1.0

AttributeError: module ‘math’ has no attribute ‘dist’

Question: Is Maya 2022 still supportet?

Thanks for your help, and for all the great work on mGear!

Cheers, Christian

I believe Maya 2022 uses Python 3.7.7. And math.dist was introduced in Python 3.8.

Maybe someone can rewrite this with a more general distance function. Or in the meantime, you can try facial_rigger2 instead of facial_rigger3. It doesn’t seem to import that library (at a very quick glance).

1 Like

Thanks for the feedback I will check if I can fix that

Thank you so much! The new face-rigging toolset looks incredibly promising, with its new workflow and the ability to prepare the face entirely procedurally using guides for the facerig. Amazing!

It would be absolutely fantastic if it were compatible with Maya 2022!

Greetings from Vienna,
Christian

This should be fixed in 5.4.2 :wink:

1 Like

Thanks so much - math.dist works now!

1 Like