controllerLibrary.py 文件源码

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

项目:PythonForMayaSamples 作者: dgovil 项目源码 文件源码
def save(self):
        # We start off by getting the name in the text field
        name = self.saveNameField.text()

        # If the name is not given, then we will not continue and we'll warn the user
        # The strip method will remove empty characters from the string, so that if the user entered spaces, it won't be valid
        if not name.strip():
            cmds.warning("You must give a name!")
            return

        # We use our library to save with the given name
        self.library.save(name)
        # Then we repopulate our UI with the new data
        self.populate()
        # And finally, lets remove the text in the name field so that they don't accidentally overwrite the file
        self.saveNameField.setText('')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号