X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=hooke%2Fplaylist.py;h=9eb7e8b7a82a9a52e7856bd3a6a079cd336f532f;hp=d3ca4c6f2bfc3996b3f80462116deef0afc1a1dd;hb=28a01c259df23e587352035f08e97295e01b3fe2;hpb=2080ad015e7239890d4bd77239016910299c2687 diff --git a/hooke/playlist.py b/hooke/playlist.py index d3ca4c6..9eb7e8b 100644 --- a/hooke/playlist.py +++ b/hooke/playlist.py @@ -119,9 +119,10 @@ class Playlist (NoteIndexList): self._loaded = [] # List of loaded curves, see :meth:`._setup_item`. self._max_loaded = 100 # curves to hold in memory simultaneously. - def append_curve_by_path(self, path, info=None, identify=True): + def append_curve_by_path(self, path, info=None, identify=True, hooke=None): path = os.path.normpath(path) c = curve.Curve(path, info=info) + c.set_hooke(hooke) if identify == True: c.identify(self.drivers) self.append(c) @@ -338,14 +339,16 @@ class FilePlaylist (Playlist): doc = xml.dom.minidom.parseString(string) self._from_xml_doc(doc, identify=identify) - def load(self, path=None, identify=True): + def load(self, path=None, identify=True, hooke=None): """Load a playlist from a file. """ self.set_path(path) doc = xml.dom.minidom.parse(self.path) self._from_xml_doc(doc, identify=identify) self._digest = self.digest() - + for curve in self: + curve.set_hooke(hooke) + def save(self, path=None): """Saves the playlist in a XML file. """