#encoding: utf-8
-#Copyright 2009 - 2010 Paul Hänsch
+#Copyright 2009 - 2011 Paul Hänsch
#This file is part of Viper.
from Tkinter import *
from vchunk import *
+from vframeset import *
import Pmw
class Timeline(Frame):
self.chunks = []
self.mods = [] # list of chunk modifying objects (filter and effect dialogs)
self.view = None # viewer widget
+ self.basedir = None #path of project directory, required for framesets
self.animChunks = BooleanVar(value = True)
tooltips = Pmw.Balloon(self)
def convert(self):
"""
- Converts marked chunks to framesets (not yet implemented)
+ Converts marked chunks to framesets
"""
- pass
+ for vc in self.chunks:
+ if vc.marked.get():
+ index = self.chunks.index(vc)
+ new = VFrameset(self.subgets['chunklist'].interior(),
+ vurl = vc.videofile,
+ )
+ new.played.set(value = vc.played.get())
+ new.marked.set(value = vc.marked.get())
+ new.play()
+ new.pack(before = vc, side=LEFT)
+ self.chunks.insert(index, new)
+ self.chunks.remove(vc)
+ vc.stop()
+ vc.destroy()
def playall(self):
"""
def set_mods(self, mods):
self.mods = mods
+
+ def set_basedir(self, basedir):
+ self.basedir = basedir
+ self.subgets['b_frameset'].config(state = 'normal')
+
+ def get_basedir(self):
+ return self.basedir