zbw_messageMapper.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:zTools 作者: zethwillie 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号