From: W. Trevor King Date: Sun, 15 Aug 2010 12:01:47 +0000 (-0400) Subject: Use input name in 'new playlist' and 'load playlist' if p.name == None. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c52f54a7fc8654bc6783ff815c93166b917faf5;p=hooke.git Use input name in 'new playlist' and 'load playlist' if p.name == None. --- diff --git a/hooke/plugin/playlist.py b/hooke/plugin/playlist.py index 912d21c..80c22d2 100644 --- a/hooke/plugin/playlist.py +++ b/hooke/plugin/playlist.py @@ -248,7 +248,7 @@ Drivers for loading curves. p = FilePlaylist(drivers=params['drivers'], path=params['input']) p.load(hooke=hooke) playlist_names = [playlist.name for playlist in hooke.playlists] - if p.name in playlist_names: + if p.name in playlist_names or p.name == None: p.name = params['output playlist'] # HACK: override input name. How to tell if it is callback-generated? self._set_playlist(hooke, params, p) outqueue.put(p) diff --git a/hooke/plugin/playlists.py b/hooke/plugin/playlists.py index 2194b04..ccd5020 100644 --- a/hooke/plugin/playlists.py +++ b/hooke/plugin/playlists.py @@ -120,6 +120,6 @@ Default filename for future saves. path=params['file'], ) playlist_names = [playlist.name for playlist in hooke.playlists] - if p.name in playlist_names: + if p.name in playlist_names or p.name == None: p.name = params['output playlist'] # HACK: override input name. How to tell if it is callback-generated? hooke.playlists.append(p)