def save_slides_scene():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.save_slides_scene(slides_scene, paths, config)
    lecture_edit.setup_slides_scene(slides_scene, paths, config)
def optimize_greenscreen_processing():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.optimize_greenscreen_processing(greenscreen_scenes, paths,
                                                 config)
def save_cut_scene():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.save_cut_scene(cut_scene, paths, config)
    lecture_edit.setup_cut_scene(cut_scene, paths, config)
    if not os.path.isfile(paths.audio_config.os):
        config.save(paths.audio_config, config.audio_config())
def save_merge_scene():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.save_merge_scene(merge_scene, paths, config)
    lecture_edit.setup_merge_scene(merge_scene, greenscreen_scenes, paths,
                                   config)
    if not os.path.isfile(paths.speaker_visibility.os) and os.path.isfile(
            paths.slide_transitions.os):
        lecture_edit.initialize_speaker_visibility(merge_scene, paths, config)
def setup():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    # create and initialize the scenes
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.setup_sync_scene(sync_scene, paths, config)
    lecture_edit.setup_cut_scene(cut_scene, paths, config)
    if os.path.isfile(paths.sync_config.os) and os.path.isfile(
            paths.cut_config.os):
        lecture_edit.setup_slides_scene(slides_scene, paths, config)
    if greenscreen_scenes:
        lecture_edit.setup_greenscreen_scenes(greenscreen_scenes, paths,
                                              config)
    if os.path.isfile(paths.sync_config.os) and os.path.isfile(
            paths.cut_config.os):
        lecture_edit.setup_merge_scene(merge_scene, greenscreen_scenes, paths,
                                       config)
    # create missing config files
    if not os.path.isfile(paths.audio_config.os):
        config.save(paths.audio_config, config.audio_config())
    if not os.path.isfile(paths.speaker_visibility.os) and os.path.isfile(
            paths.slide_transitions.os):
        lecture_edit.initialize_speaker_visibility(merge_scene, paths, config)
def create_presentation():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.create_presentation(merge_scene, paths, config)
def normalize_audio():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    lecture_edit.normalize_audio(paths, config)
def convert_slides_videos():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    lecture_edit.convert_slides_videos(paths, config)
def initialize_speaker_visibility():
    paths = lecture_edit.Paths(bpy.data.filepath)
    config = lecture_edit.Config(paths)
    sync_scene, cut_scene, slides_scene, greenscreen_scenes, merge_scene = lecture_edit.scenes(
        paths, config)
    lecture_edit.initialize_speaker_visibility(merge_scene, paths, config)