Changed the Vertex class to inherit from list
- allows for simpler jsonification
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user