From 9e508fa0738dafca7f33ba6dceaef1981711d6a4 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Mon, 24 Jun 2019 17:37:00 +0930
Subject: [PATCH] BF: GiftiMesh was passing a list of vertex arrays to
 addVertices - need to pass one at a time

---
 fsl/data/gifti.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fsl/data/gifti.py b/fsl/data/gifti.py
index aa8b20ed7..2d1f3856d 100644
--- a/fsl/data/gifti.py
+++ b/fsl/data/gifti.py
@@ -138,7 +138,10 @@ class GiftiMesh(fslmesh.Mesh):
 
         surfimg, _, vertices, _ = loadGiftiMesh(infile)
 
-        vertices = self.addVertices(vertices, key, *args, **kwargs)
+        for i, v in enumerate(vertices):
+            if i == 0: key = infile
+            else:      key = '{}_{}'.format(infile, i)
+            vertices[i] = self.addVertices(v, key, *args, **kwargs)
 
         self.setMeta(infile, surfimg)
 
-- 
GitLab