Commit af574f26 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Duh, Mesh.init(fixWinding) was not being passed through. Use absolute data

file path for vertex data key.
parent 78b22de4
...@@ -214,7 +214,7 @@ class Mesh(notifier.Notifier, meta.Meta): ...@@ -214,7 +214,7 @@ class Mesh(notifier.Notifier, meta.Meta):
# Add initial vertex # Add initial vertex
# set if provided # set if provided
if vertices is not None: if vertices is not None:
self.addVertices(vertices) self.addVertices(vertices, fixWinding=fixWinding)
def __repr__(self): def __repr__(self):
...@@ -417,8 +417,9 @@ class Mesh(notifier.Notifier, meta.Meta): ...@@ -417,8 +417,9 @@ class Mesh(notifier.Notifier, meta.Meta):
nvertices = self.vertices.shape[0] nvertices = self.vertices.shape[0]
if vdata.shape[0] != nvertices: if vdata.ndim not in (1, 2) or vdata.shape[0] != nvertices:
raise ValueError('Incompatible vertex data size: {}'.format(key)) raise ValueError('{}: incompatible vertex data '
'shape: {}'.format(key, vdata.shape))
self.__vertexData[key] = vdata.reshape(nvertices, -1) self.__vertexData[key] = vdata.reshape(nvertices, -1)
......
...@@ -71,8 +71,8 @@ class VTKMesh(fslmesh.Mesh): ...@@ -71,8 +71,8 @@ class VTKMesh(fslmesh.Mesh):
fslmesh.Mesh.__init__(self, fslmesh.Mesh.__init__(self,
indices, indices,
name, name=name,
dataSource, dataSource=dataSource,
vertices=data, vertices=data,
fixWinding=fixWinding) fixWinding=fixWinding)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment