Add all_drivers_callback to hooke.plugin.playlist.LoadCommand.
authorW. Trevor King <wking@drexel.edu>
Thu, 13 May 2010 11:27:58 +0000 (07:27 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 13 May 2010 11:27:58 +0000 (07:27 -0400)
I can't imagine the user not wanting to use all available playlists.
They still can, but specifiying a sublist is now optional.

hooke/plugin/playlist.py

index a374e0885c96986a44fc4590fb0c2dca2250370a..2e943829b303025fd76ba95dd9b6a49882946a35 100644 (file)
@@ -48,6 +48,9 @@ PlaylistNameArgument = Argument(
 Name of the new playlist (defaults to an auto-generated name).
 """.strip())
 
+def all_drivers_callback(hooke, command, argument, value):
+    return hooke.drivers
+
 
 # Define commands
 
@@ -152,8 +155,8 @@ class LoadCommand (Command):
                          help="""
 File name for the input playlist.
 """.strip()),
-                Argument(name='drivers', type='driver', optional=False,
-                         count=-1,
+                Argument(name='drivers', type='driver', optional=True,
+                         count=-1, callback=all_drivers_callback,
                          help="""
 Drivers for loading curves.
 """.strip()),