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):
# Add initial vertex
# set if provided
if vertices is not None:
self.addVertices(vertices)
self.addVertices(vertices, fixWinding=fixWinding)
def __repr__(self):
......@@ -417,8 +417,9 @@ class Mesh(notifier.Notifier, meta.Meta):
nvertices = self.vertices.shape[0]
if vdata.shape[0] != nvertices:
raise ValueError('Incompatible vertex data size: {}'.format(key))
if vdata.ndim not in (1, 2) or vdata.shape[0] != nvertices:
raise ValueError('{}: incompatible vertex data '
'shape: {}'.format(key, vdata.shape))
self.__vertexData[key] = vdata.reshape(nvertices, -1)
......
......@@ -71,8 +71,8 @@ class VTKMesh(fslmesh.Mesh):
fslmesh.Mesh.__init__(self,
indices,
name,
dataSource,
name=name,
dataSource=dataSource,
vertices=data,
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