zbw_appendPath.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def loadValues(*args):
    """loads the saved path file, if there is one"""
    #check if file exists
    try:
        userDir = cmds.internalVar(upd=True) + "zbw_appendPathSave.txt"
        file = open(userDir, "r")
        paths = []
        #read values from file to list
        for line in file:
            paths.append(line.rstrip("\n"))
        file.close()

        #replace tfbg's with those values
        cmds.textFieldButtonGrp(widgets["path1"], e=True, tx=paths[0])
        cmds.textFieldButtonGrp(widgets["path2"], e=True, tx=paths[1])
        cmds.textFieldButtonGrp(widgets["path3"], e=True, tx=paths[2])
    except IOError:
        cmds.warning("You don't seem to have a 'zbw_appendPathSave.txt' file saved in your user prefs dir")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号