vse_toolbox/constants.py

28 lines
690 B
Python

import appdirs
import bpy
import bpy.utils.previews
import os
from pathlib import Path
from tempfile import gettempdir
MODULE_DIR = Path(__file__).parent
TRACKERS_DIR = MODULE_DIR / 'resources' / 'trackers'
TRACKERS = []
PROJECTS = []
EDITS = [('NONE', 'None', '', 0)]
MOVIES = [('NONE', 'None', '', 0)]
SOUNDS = [('NONE', 'None', '', 0)]
# ASSETS = [('NONE', 'None', '', 0)]
EDIT_SUFFIXES = ['.xml', '.edl']
MOVIE_SUFFIXES = ['.mov', '.mp4']
SOUND_SUFFIXES = ['.mp3', '.aaf', '.flac']
CONFIG_DIR = Path(appdirs.user_config_dir(__package__.split('.')[0]))
PREVIEWS_DIR = CONFIG_DIR / 'thumbnails'
ASSET_PREVIEWS = bpy.utils.previews.new()
CASTING_BUFFER = CONFIG_DIR / 'casting.json'