def channelbox_command_setSpeed(box, menuItem, key, *args):
# Sets the incremental size for attributes when modifying with middle mouse,
# eg 'medium' appends +1/-1, 'fast' is +10/-10
with sysCmd.Undo(0):
state = 1 if key == "speedSlow" else 2 if key == "speedMedium" else 3
if state == 1:
cmds.channelBox(box.channelbox, e=1, speed=0.1)
elif state == 2:
cmds.channelBox(box.channelbox, e=1, speed=1)
else:
cmds.channelBox(box.channelbox, e=1, speed=10)
box.saved_states["speedState"][0] = state
if box.saved_states["showIcons"][0]:
channelbox_command_Symbol_update(box, "speedState")
sysCmd.channelbox_save_state(box)
jtChannelBox_Commands_Default.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录