jtChannelBox_Commands_Default.py 文件源码

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

项目:ModularChannelBox 作者: Vaei 项目源码 文件源码
def channelbox_command_syncGraph(box, menuItem, key, *args):
    with sysCmd.Undo(0):
        state = channelBox_Checkbox_Update(box, key, menuItem)
        if not state and box.menu_jobs[key] > 0:
            # if user disabled the option, and ScriptJob is running, kill the ScriptJob
            cmds.scriptJob(k=box.menu_jobs[key])
            box.menu_jobs[key] = -1

        if state:
            mel.eval("GraphEditor;")  # open graph editor
            cmds.channelBox(box.channelbox, e=1, exe=(channelbox_command_animCurve(box, menuItem, key), 0))
            if box.menu_jobs[key] < 0:  # if ScriptJob is not running, start it
                box.menu_jobs[key] = cmds.scriptJob(
                    event=("ChannelBoxLabelSelected", partial(channelbox_command_syncGraph_scriptJob, box)),
                    parent=box.channelbox)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号