video_editing_mouse.py 文件源码

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

项目:Blender-power-sequencer 作者: GDquest 项目源码 文件源码
def invoke(self, context, event):
        sequencer = bpy.ops.sequencer

        # get current frame and channel the mouse hovers
        x, y = context.region.view2d.region_to_view(
            x=event.mouse_region_x,
            y=event.mouse_region_y)
        frame, channel = round(x), floor(y)

        # Strip selection
        sequencer.select_all(action='DESELECT')
        to_select = find_strips_mouse(frame, channel)

        if not to_select:
            return {"CANCELLED"}

        for s in to_select:
            s.mute = not s.mute
        return {"FINISHED"}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号