From cbc5ec7ecdc2d71271c58c9ae6dd15b9ffcae57f Mon Sep 17 00:00:00 2001 From: Jeroen Hoolmans Date: Tue, 13 Aug 2013 11:55:53 +0200 Subject: [PATCH] Update bvh_importer.py Fix #4. Error reading iPi Studio BVH files. --- bvh_importer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bvh_importer.py b/bvh_importer.py index 77054b2..9fc459f 100644 --- a/bvh_importer.py +++ b/bvh_importer.py @@ -275,6 +275,8 @@ def _read_bvh(self, e=False): # We don't really need to use Framecount and time(since Python handles file reads nicely) if "Frame" not in line: data = line.split(" ") + if len(data) > 0: + if data[0] == "": data.pop(0) if self._debug: print "Animating.." @@ -315,4 +317,4 @@ def _on_select_root(self, e): mc.textField(self._textfield, e=True, text=str(self._rootNode)) if __name__ == "__main__": - dialog = BVHImporterDialog() \ No newline at end of file + dialog = BVHImporterDialog()