def channelbox_command_setChannelName(box, menuItem, key, *args):
# set display type for the names in the channel box and adjust the width of the columns displaying the label
with sysCmd.Undo(0):
state = 1 if key == "nameNice" else 2 if key == "nameLong" else 3
if state == 1:
width = 180
cmds.channelBox(box.channelbox, e=1, lw=width, ln=1, nn=1)
elif state == 2:
width = 180
cmds.channelBox(box.channelbox, e=1, lw=width, ln=1, nn=0)
else:
width = 140
cmds.channelBox(box.channelbox, e=1, lw=width, ln=0, nn=0)
box.saved_states["namesState"][0] = state
box.saved_states["channelWidth"][0] = width
sysCmd.channelbox_save_state(box)
# -----------------------------------------
# --------------- SHOW MENU ---------------
# -----------------------------------------
jtChannelBox_Commands_Default.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录