def deleteRig(*args):
# check for ctrl
sel = cmds.ls(sl=True, type="transform")
if sel:
for ctrl in sel:
# try
rpt = cmds.connectionInfo("{0}.rptMult".format(ctrl), sfd=True).partition(".")[0]
dens = cmds.connectionInfo("{0}.densMult".format(ctrl), sfd=True).partition(".")[0]
curve = cmds.connectionInfo("{0}.origCrv".format(ctrl), sfd=True).partition(".")[0]
para = cmds.connectionInfo("{0}.paraMult".format(ctrl), sfd=True).partition(".")[0]
if rig.parentCheck(curve):
cmds.parent(curve, world=True)
cmds.setAttr("{0}.v".format(curve), 1)
# check for file node, grab it, then find p2d from that and delete it
fTextFull = cmds.connectionInfo("{0}.fileTexture".format(ctrl), sfd=True)
print
"fTextFull:", fTextFull
if fTextFull:
fText = fTextFull.partition(".")[0]
print
fText
p2dFull = cmds.connectionInfo("{0}.uvCoord".format(fText), sfd=True)
print
p2dFull
if p2dFull:
p2d = p2dFull.partition(".")[0]
cmds.delete(p2d)
print
"ready to delete"
cmds.delete(fText)
cmds.delete([ctrl, rpt, dens, para])
评论列表
文章目录