Wires, used in Lips Rigger script, so bugged. Playing with dropoff, scale, rotate options did not fix wire lips.
This shit-script replace this wires with rebuild nodes.
Before:
https://monosnap.com/file/Qdk2X6YtY8wsG17QDiYKvUKd8ArXdM
After:
https://monosnap.com/file/fWDmBKsS4UCD5gFyBgu6mLsJ2FbkPK
Script:
import pymel.core as pm
def convert_wires_to_reba():
#### for 2.xx ####
'''
xxx = [
['lips_C_upCrv_ctlShape', 'lips_C_upperLipShape'],
['lips_C_lowCrv_ctlShape', 'lips_C_lowerLipShape'],
['lips_C_upCrv_ctlShape', 'lips_C_upRope_crvShape'],
['lips_C_lowCrv_ctlShape', 'lips_C_lowRope_crvShape'],
['lips_C_upCrv_upvShape', 'lips_C_upRope_upvShape'],
['lips_C_lowCrv_upvShape', 'lips_C_lowRope_upvShape']
]
'''
#### for 3.xx ####
xxx = [
['lips_C_upCtl_crvShape', 'lips_C_upperLipShape'],
['lips_C_lowCtl_crvShape', 'lips_C_lowerLipShape'],
['lips_C_upCtl_crvShape', 'lips_C_upRope_crvShape'],
['lips_C_lowCtl_crvShape', 'lips_C_lowRope_crvShape'],
['lips_C_upCrv_upvShape', 'lips_C_upRope_upvShape'],
['lips_C_lowCrv_upvShape', 'lips_C_lowRope_upvShape']
]
for src_name, trg_name in xxx:
wireNode = pm.listConnections( src_name+'.worldSpace[0]', d=1, s=0,type='wire')
print('wireNode:', wireNode)
src = pm.PyNode(src_name)
trg = pm.PyNode(trg_name)
spans_num = trg.spans.get()
reba = pm.rebuildCurve(src, ch=1, rpo=0, rt=0, end=1, kr=0, kcp=0, kep=1, kt=0, s=spans_num, d=3, tol=0.01, object=0, smooth=2 )[0]
reba.outputCurve >> trg.create
print(src_name, ' >> ', trg_name, 'spans_num:', spans_num)
print(reba)
pm.delete(wireNode)
convert_wires_to_reba()