remove_bz_audio.py 文件源码

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

项目:Bizualizer 作者: doakey3 项目源码 文件源码
def execute(self, context):

        scene = context.scene

        if not scene.sequence_editor:
            return {"FINISHED"}

        audiofile = bpy.path.abspath(scene.bz_audiofile)
        name = ntpath.basename(audiofile)
        all_strips = list(sorted(
            bpy.context.scene.sequence_editor.sequences_all,
            key=lambda x: x.frame_start))
        bpy.ops.sequencer.select_all(action="DESELECT")
        count = 0
        for strip in all_strips:
            if strip.name.startswith("bz_" + name):
                strip.select = True
                bpy.ops.sequencer.delete()

        return {"FINISHED"}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号