Skip to content
Snippets Groups Projects
Commit af574f26 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

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

file path for vertex data key.
parent 78b22de4
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment