Today I needed to convert the eye rig to the default MayĐ° nodes.
It was not difficult for the eyes rig.
I’ll leave the script here, maybe it will come in handy for someone.
# eyes mGear convert nodes
# convert "mgear_curveCns" nodes to default nurbs curves
import pymel.core as pm
for mg_cCns in pm.ls(type='mgear_curveCns'):
crve = ''
for src_a, crv_a in pm.listConnections( mg_cCns+'.outputGeometry', p=True, c=True ):
print 'Trg:', crv_a
print 'Src:', src_a
crve = pm.duplicate(crv_a.node())[0]
crve.worldSpace[0] >> crv_a
crv_a.node().getParent().inheritsTransform.set(0)
for i, trg_src in enumerate(pm.listConnections( mg_cCns+'.inputs', d=False, p=True, c=True ) ):
trg_a, src_a = trg_src
print 'i:', i
print 'Trg:', trg_a
print 'Src:', src_a
DCm = pm.createNode('decomposeMatrix', name=src_a.nodeName()+'DCm')
src_a >> DCm.inputMatrix
DCm.outputTranslate >> crve.controlPoints[i]
pm.delete(mg_cCns)