def __init__(self, profile): #profile is mlt.Profile here, made using file path self.name = _("untitled") + appconsts.PROJECT_FILE_EXTENSION self.profile = profile self.profile_desc = profile.description() self.bins = [] self.media_files = {} # MediaFile.id(key) -> MediaFile object(value) self.sequences = [] self.next_media_file_id = 0 self.next_bin_number = 1 # This is for creating name for new bin self.next_seq_number = 1 # This is for creating name for new sequence self.last_save_path = None self.events = [] self.media_log = [] self.media_log_groups = [] self.proxy_data = miscdataobjects.ProjectProxyEditingData() self.update_media_lengths_on_load = False # old projects < 1.10 had wrong media length data which just was never used. # 1.10 needed that data for the first time and required recreating it correctly for older projects self.project_properties = { } # Key value pair for misc persistent properties, dict is used that we can add thesse without worrying loading self.SAVEFILE_VERSION = SAVEFILE_VERSION # c_seq is the currently edited Sequence self.add_unnamed_sequence() self.c_seq = self.sequences[0] # c_bin is the currently displayed bin self.add_unnamed_bin() self.c_bin = self.bins[0] self.init_thumbnailer()
def __init__(self, profile): #profile is mlt.Profile here, made using file path self.name = _("untitled") + appconsts.PROJECT_FILE_EXTENSION self.profile = profile self.profile_desc = profile.description() self.bins = [] self.media_files = {} # MediaFile.id(key) -> MediaFile object(value) self.sequences = [] self.next_media_file_id = 0 self.next_bin_number = 1 # This is for creating name for new bin self.next_seq_number = 1 # This is for creating name for new sequence self.last_save_path = None self.events = [] self.media_log = [] self.media_log_groups = [] self.proxy_data = miscdataobjects.ProjectProxyEditingData() self.SAVEFILE_VERSION = SAVEFILE_VERSION # c_seq is the currently edited Sequence self.add_unnamed_sequence() self.c_seq = self.sequences[0] # c_bin is the currently displayed bin self.add_unnamed_bin() self.c_bin = self.bins[0] self.init_thumbnailer()
def FIX_MISSING_PROJECT_ATTRS(project): if (not(hasattr(project, "proxy_data"))): project.proxy_data = miscdataobjects.ProjectProxyEditingData() if (not(hasattr(project, "media_log"))): project.media_log = [] if (not(hasattr(project, "events"))): project.events = [] if (not(hasattr(project, "media_log_groups"))): project.media_log_groups = []