Home Website Youtube GitHub

eye_rigger.eyesFromFile to error

Hi!

I’m using the function eye_rigger.eyesFromFile to load a JSON configuration file that I authored in the Eye Rigger interface, and it’s spitting this error:

# Traceback (most recent call last):
#   File "<string>", line 17, in <module>
#   File "<string>", line 1, in <module>
#   File "C:/Users/18182/Documents/maya/2019/scripts\mgear\rigbits\eye_rigger.py", line 1191, in eyesFromfile
#     eyeRig(*buildDict["eye"])
# KeyError: 'eye'

When I load that file in the interface, and build through there, it works without any issue. I tried with different JSON files and the result is the same. Do you know what the cause could be?

Thanks!

Are you calling the right tool? Did you use the new facial_rigger version in the UI?

from mgear import rigbits

# OLD LEGACY eye_rigger and lips_rigger tool
rigbits.eye_rigger.eyesFromfile(eyesConfigPath)
rigbits.lips_rigger.lipsFromfile(lipsConfigPath)
 
# NEW "facial_rigger" module
rigbits.facial_rigger.eye_rigger.rig_from_file(eyesConfigPath)
rigbits.facial_rigger.lips_rigger.rig_from_file(lipsConfigPath)

(updated to include the lips too, for anyone searching this.)

2 Likes

That was it, Chris! Thanks a lot! I was following the documentation, but now I realize it was for 3.0. I should have been aware of that!

Add a coffee/beer to the list that I already owe you and the team. Big thanks!

2 Likes