jtChannelBox_Commands_Default.py 文件源码

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

项目:ModularChannelBox 作者: Vaei 项目源码 文件源码
def channelbox_command_cboxReset(box, menuItem, key, *args):
    with sysCmd.Undo(0):
        confirm = cmds.confirmDialog(t="Reset to Default",
                                     m="Delete all saved data and modified settings associated with this Channel Box?",
                                     icon="critical", button=["Reset", "Cancel"])

        if confirm == "Reset":

            default_states = box.menu_default_states

            for k, v in default_states.iteritems():
                # compare keys containing a default state with items that exist in the edit menu or others
                # specified and restore them
                box.saved_states[k] = v

            sysCmd.channelbox_pickle_delete_state(box)
            # box.re_init(box)  # re-initialize to update our changes in the display
            cmds.warning("Please close the ChannelBox UI and re-open it for changes to take effect")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号