Home Website Youtube GitHub

Lip rigger from script fails: Need at least (degree + 1)

Hi again,

I believe I found a bug in the lip rigger script but I am only half sure about the entire problem.
Or whats the best way to build around it. Anyway here it goes.

I tried building a Lip rigger rig from script today and sometimes it worked sometimes it didn’t from the UI it’s always succesfull. The error is this:
Error: RuntimeError: file C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\pymel\internal\pmcmds.py line 134: Need at least (degree + 1) control vertices to create a curve span

huh? okay so obviously I can’t build a curve because I am missing cvs / points. Weird. After diving through the entire function chain down to pm.curve() it curiously did work as well. After trying to build the rig again and really forcing the error while going through the script line by line I found the problem.
When rebuilding my rig I often just delete the rig group, leaving a meshDeformed shape on my geometries behind. In the lip rigger config I explicitly set the undeformed edges because I could not guarantee that the deformedShape would always be present.

the real problem here is that
line 162 of mgear.maya.curve
vList = pm.polyListComponentConversion(edgeList, fe=True, tv=True)

Does not evaluate correctly if the shape is not visible (because it is an intermediate shape) and instead vList stays an empty array.

I don’t know if it would be wise to force showing the mesh of the edgeList edges by any means possible or if there is just a better way to convert the selection which does not depend on the shape being visible / not intermediate.

What works for sure is a pre build script which gets rid of all the deformed shape nodes, which should be cleaner anyway. However I thought I’d document this if someone else stumbles across the issue or to make the script more robust in the future.


Hi @fleity

Thanks for checking this! I will review the code this week. Since I also need to use the tool :stuck_out_tongue:

I have added a link to this post in another ticket for the lips rigger, so I don’t forget:


Hi, I have still the error in mGear 4.0.9. I found that it’s due to my upper and lower vertex. The rigger should select the verticies that are precisely on the edgeloop previously filled :wink: So now it’s working

1 Like