def zbw_mmAddMObjs(*args):
"""
adds textFields to the UI for adding target objects for the message attrs
"""
#delete text confirm dialogue if it exists
zbw_mmDeleteConfirm()
#figure out what objects are already parented
children = cmds.rowColumnLayout("mmRCLayout" , q=True, ca=True)
#figure out where stuff goes (2 column layout, so divide by 2), 1 based
if children:
currentNum = len(children)/2 + 1
currentTFG = "attr" + str(currentNum)
currentTFBG = "obj" + str(currentNum)
#if no objects exist . . .
else:
currentTFG = "attr1"
currentTFBG = "obj1"
cmds.textFieldGrp(currentTFG, l="addedAttr (ln)", cal=(1, "left"), cw2=(100, 150), p="mmRCLayout")
cmds.textFieldButtonGrp(currentTFBG, l="messageObj", cal=(1, "left"), cw3=(75,150,50), p="mmRCLayout", bl="get", bc=partial(zbw_mmAddTarget, currentTFBG))
#proc to grab the attrs and create connections
评论列表
文章目录