def getGeo(self, *args):
#get selection and put it's full path into the tfbg
sel = cmds.ls(sl=True, type="transform", l=True)
print(sel)
if len(sel) != 1:
cmds.warning("yo. Select one and only one nurbs surface")
else:
#check for nurbsy-ness
if (cmds.objectType(cmds.listRelatives(sel[0], shapes=True)[0])!="nurbsSurface"):
cmds.error("Selected is not a nurbs surface")
else:
cmds.textFieldButtonGrp(self.widgets["geoTFBG"], e=True, tx=sel[0])
评论列表
文章目录