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")
jtChannelBox_Commands_Default.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录