# Path: operators/tools/get_open_channel.py
# def get_open_channel(scene):
#     """Get a channel with nothing in it"""
#     channels = []
#     try:
#         for strip in scene.sequence_editor.sequences_all:
#             channels.append(strip.channel)
#         if len(channels) > 0:
#             return max(channels) + 1
#         else:
#             return 1
#     except AttributeError:
#         return 1
# 
# Path: operators/tools/get_font.py
# def get_font(font_path):
# 
# 	if os.path.isfile(font_path):
# 		return bpy.data.fonts.load(font_path, check_existing=True)
# 	else:
# 		return None


import bpy
from .get_open_channel import get_open_channel
from .get_font import get_font


def subtitles_to_sequencer(context, subs):
    """Add subtitles to the video sequencer"""

    scene = context.scene
    fps = scene.render.fps / scene.render.fps_base

# Path: operators/tools/get_open_channel.py
# def get_open_channel(scene):
#     """Get a channel with nothing in it"""
#     channels = []
#     try:
#         for strip in scene.sequence_editor.sequences_all:
#             channels.append(strip.channel)
#         if len(channels) > 0:
#             return max(channels) + 1
#         else:
#             return 1
#     except AttributeError:
#         return 1
# 
# Path: operators/tools/get_font.py
# def get_font(font_path):
# 
# 	if os.path.isfile(font_path):
# 		return bpy.data.fonts.load(font_path, check_existing=True)
# 	else:
# 		return None


# Path: operators/tools/subtitles_to_sequencer.py
import bpy
from .get_open_channel import get_open_channel
from .get_font import get_font



def subtitles_to_sequencer(context, subs):
    """Add subtitles to the video sequencer"""

    scene = context.scene
    fps = scene.render.fps / scene.render.fps_base

    open_channel = get_open_channel(scene)