def populateCrvField(tfgKey="", *args):
if tfgKey not in ["cntrPivTFBG", "cntrPiv2TFBG", "upLoc2TFBG", "upLocTFBG"]:
sel = cmds.ls(sl=True)
if sel and len(sel)!=1:
cmds.warning("only select the curve you want to rig up!")
else:
if rig.isType(sel[0], "nurbsCurve"):
cmds.textFieldButtonGrp(widgets[tfgKey], e=True, tx=sel[0])
else:
cmds.warning("That's not a curve!")
else:
sel = cmds.ls(sl=True)
if sel and len(sel)!=1:
cmds.warning("only select the object you want to rig up!")
else:
cmds.textFieldButtonGrp(widgets[tfgKey], e=True, tx=sel[0])
if tfgKey == "upLocTFBG":
cmds.textFieldButtonGrp(widgets["upLoc2TFBG"], e=True, tx=sel[0])
if tfgKey == "cntrPivTFBG":
cmds.textFieldButtonGrp(widgets["cntrPiv2TFBG"], e=True, tx=sel[0])
评论列表
文章目录