Changed the Vertex class to inherit from list

- allows for simpler jsonification
This commit is contained in:
Stephen M. McQuay
2012-05-10 08:51:52 -06:00
parent a00f1cb59a
commit 544a570629
2 changed files with 39 additions and 20 deletions
+4 -3
View File
@@ -88,10 +88,11 @@ def refine(mesh):
if __name__ == '__main__':
import sys
import json
from surf.subd.cc import refine
cube = json.load(open('blender/samples/cube.json', 'r'))
input_file_name = sys.argv[1]
cube = json.load(open(input_file_name, 'r'))
p = PolygonMesh(**cube)
q = refine(p)
print json.dumps({'vertices': [list(v) for v in q.vertices]})
print q