Replace .config rather than reconstructing plugins, drivers, and UIs.
[hooke.git] / hooke / plugin / playlist.py
index 4a5efd4304b16556bca5711b214b8bf9a9af697d..69cc56227ba106a9736bf1ffc34a3bea1a64c093 100644 (file)
@@ -212,7 +212,6 @@ class SaveCommand (PlaylistCommand):
         super(SaveCommand, self).__init__(
             name='save playlist',
             arguments=[
-                PlaylistArgument,
                 Argument(name='output', type='file',
                          help="""
 File name for the output playlist.  Defaults to overwriting the input
@@ -248,6 +247,9 @@ Drivers for loading curves.
     def _run(self, hooke, inqueue, outqueue, params):
         p = FilePlaylist(drivers=params['drivers'], path=params['input'])
         p.load(hooke=hooke)
+        playlist_names = [playlist.name for playlist in hooke.playlists]
+        if p.name not in playlist_names:
+            params['output playlist'] = p.name  # HACK: override input name.  How to tell if it is callback-generated?
         self._set_playlist(hooke, params, p)
        outqueue.put(p)