Well, I don’t know. I didn’t know about curve.export_curve.
But I can offer you an alternative, and this is what I do. I’ve never exported curves to a file. I extract the curves from my face rig into the controller_buffer group.
And then after rigging the lips and eyes, I run this script. It replaces the curves with the controllers_org version. And this works perfectly well with nurbsSurface shapes as well. This is basically what any Shifter component does when it searches controller_buffer for matching shapes. It just doesn’t do it automatically in the face rigging tools (yet).
Depending on your rig, you may have to adjust these lists of names.
import pymel.core as pm
from mgear import rigbits
### fix missing buffer controls for the face. It doesn't do it automatically!
### For any beginners reading this, {} is referring to string formatting. {} gets replaced later in the script.
eyeControls = [
'eye_{}_aim_ctl',
'eye_{}_inCorner_ctl',
'eye_{}_lowInMid_ctl',
'eye_{}_lowMid_ctl',
'eye_{}_lowOutMid_ctl',
'eye_{}_outCorner_ctl',
'eye_{}_over_ctl',
'eye_{}_upInMid_ctl',
'eye_{}_upMid_ctl',
'eye_{}_upOutMid_ctl',
]
lipControls = [
'lips_L_lowOuter_ctl',
'lips_L_lowInner_ctl',
'lips_C_lower_ctl',
'lips_R_lowInner_ctl',
'lips_R_lowOuter_ctl',
'lips_L_corner_ctl',
'lips_L_upOuter_ctl',
'lips_L_upInner_ctl',
'lips_C_upper_ctl',
'lips_R_upInner_ctl',
'lips_R_upOuter_ctl',
'lips_R_corner_ctl',
]
for side in 'LR':
for eyeControl in eyeControls:
if pm.objExists(eyeControl.format(side) + '_controlBuffer'):
oTarget = pm.PyNode(eyeControl.format(side))
oSource = pm.PyNode(eyeControl.format(side) + '_controlBuffer')
rigbits.replaceShape(oSource, [oTarget])
for lipControl in lipControls:
if pm.objExists(lipControl + '_controlBuffer'):
oTarget = pm.PyNode(lipControl)
oSource = pm.PyNode(lipControl + '_controlBuffer')
rigbits.replaceShape(oSource, [oTarget])