zbw_messageMapper.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def zbw_mmChangeConnectAttrUI(base, attr, obj, *args):
    if (cmds.window('zbw_mmChangeAttrUI', exists=True)):
        cmds.deleteUI('zbw_mmChangeAttrUI', window=True)
        cmds.windowPref('zbw_mmChangeAttrUI', remove=True)
    window=cmds.window('zbw_mmChangeAttrUI', widthHeight=(400,80), title='zbw_messageMapper_changeAttrName')
    cmds.columnLayout()
    #show old attr name
    cmds.text("old attribute name: " + attr)
    #asks for the new attr name
    cmds.textFieldGrp("zbw_mmChangeAttrTFG", l="new attr name (just attr name)")
    #button to do it (pass along attr, obj)
    cmds.button("zbw_mmChangeAttrB", l="change attr!", c=partial(zbw_mmChangeConnectAttr, base, attr, obj))
    cmds.showWindow(window)
    #force window to size
    cmds.window('zbw_mmChangeAttrUI', e=True, widthHeight = (400,80))
    pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号