Add 'block names' argument to 'curve info'.
[hooke.git] / hooke / plugin / curve.py
index 20d4e5e32e4cbf99d3f4c1debd757a341a417540..dbdace99c68c73b88e3c0ac4a7d9ca0d3c1fb90f 100644 (file)
@@ -293,7 +293,8 @@ class InfoCommand (CurveCommand):
                      help='Get all curve information.'),
             ]
         self.fields = ['name', 'path', 'experiment', 'driver', 'filetype',
-                       'note', 'command stack', 'blocks', 'block sizes']
+                       'note', 'command stack', 'blocks', 'block names',
+                       'block sizes']
         for field in self.fields:
             args.append(Argument(
                     name=field, type='bool', default=False, count=1,
@@ -343,6 +344,9 @@ class InfoCommand (CurveCommand):
     def _get_blocks(self, curve):
         return len(curve.data)
 
+    def _get_block_names(self, curve):
+        return [block.info['name'] for block in curve.data]
+
     def _get_block_sizes(self, curve):
         return [block.shape for block in curve.data]