Website Youtube GitHub

mGear Framework Forum

Brow Rigger Script not working

I am having trouble with the brow rigger in symmetry mode, So I turned off symmetry. It worked for the left side and centre brow area, but rigging the right side is a challenge. The controls are built but the joint are not.

I keep getting this error…

UnboundLocalError: local variable ‘parent_tag_R’ referenced before assignment

Any suggestions?

I always make a clean piece of geometry to place the brow joints, I would try that first… It can be a bit buggy with the selection.

1 Like

i dont want to say that the mgear eyebrow rig is bad, its nice to have it, but i always have building problems with it…the same goes for the eyerigger…(which when it works, gives nice deformation and fleshy behaviour)…
but i ended up using another approach, wich is very easy to setup and the results are very good:
ribbon based eyebows or lips…
take a look here:

in this tutorial series there are also the neccassary tools/scripts to setup this very quickly…

(another quick rigging tip is to divide your facial setup in different parts, like lips, eyebrows, eyes, etc by using blendshape targets that are only rigged/skinned for that particular part…so skinning management is more clear and organized)


Is there more to the error? Can you please post the entire stack trace? It should also say what line and which script is causing the problem.

Hey @Shingai,
I’ve faced those issues too, the full error code should be:

# Traceback (most recent call last):
#   File "D:\Dropbox (Siekiera)\maya_scripts\mgear\latest\scripts\mgear\rigbits\facial_rigger\", line 1524, in build_rig
#     rig(**lib.get_settings_from_widget(self))
#   File "D:\Dropbox (Siekiera)\maya_scripts\mgear\latest\scripts\mgear\rigbits\facial_rigger\", line 764, in rig
#     tag_parent = parent_tag_R

That’s right?

Did not have much time to dig into the code, but have found that var parent_tag_R is not assigned, instead parent_tag_L when the side is set to R has a correct value.

As a quick fix, you can replace that from parent_tag_R to _L in the file: rigbits/facial_rigger/

Then all modes should be working just fine, just wonder why you have those central joints created.
By default, you should have mode set to C (then script will create left/central/right module), with separate modes it should create a single module only.

So mode C:

Mode L + R:


Thanks bro!

That did the trick! Initially I was building on top of the base of another solution however, the Left, Right solution works for better because I want to maintain that crease between the eyebrows.

Many Thanks again!

I just noticed another error… if I rotate the rig 90-180 degrees, the brow rig falls apart!

Hi @Shingai, I’m sorry I missed this post. Did you ever solve the brows falling apart?

When you rotate a rig and something flips, this usually happens when something needs to parented to the head, but it is staying in world space.

I would try to look at the parent groups of the controls, or the parent group of the nodes that are driving the brow joints. Or the parent group of any upvector nodes. And try to parentConstrain them to the head joint.

If you need more help, feel free to share a rig and I’ll take a quick look. If you aren’t allowed to share your geometry, you can just share the rig, and I can attach my own geometry as a test.