load_files.py 文件源码

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

项目:Blender-power-sequencer 作者: GDquest 项目源码 文件源码
def import_audio(self, project_directory, audio_files, import_channel):
        """
        Imports audio files as sound strips from absolute file paths
        Returns the list of newly imported audio files
        """
        import_frame = bpy.context.scene.frame_current
        new_sequences = []
        for f in audio_files:
            audio_abs_path = os.path.join(project_directory, f)
            bpy.ops.sequencer.sound_strip_add(
                self.SEQUENCER_AREA,
                filepath=audio_abs_path,
                frame_start=import_frame,
                channel=import_channel)
            new_sequences.extend(bpy.context.selected_sequences)
            import_frame = bpy.context.selected_sequences[0].frame_final_end
        return new_sequences
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号