Created
December 6, 2016 14:51
-
-
Save anonymous/3f2068bd472784c56d43fbfd5a8e58c4 to your computer and use it in GitHub Desktop.
to do later?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"export_version": "0.062", | |
"framed_nodes": {}, | |
"groups": {}, | |
"nodes": { | |
"Int": { | |
"bl_idname": "IntegerNode", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": false, | |
"label": "", | |
"location": [ | |
-527.2535400390625, | |
-243.12001037597656 | |
], | |
"params": { | |
"int_": 550, | |
"maxim": 10000 | |
}, | |
"width": 140.0 | |
}, | |
"Int.001": { | |
"bl_idname": "IntegerNode", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": true, | |
"label": "", | |
"location": [ | |
-321.22503662109375, | |
-202.39041137695312 | |
], | |
"params": { | |
"int_": 2 | |
}, | |
"width": 140.0 | |
}, | |
"List Slice": { | |
"bl_idname": "ListSliceNode", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": true, | |
"label": "", | |
"location": [ | |
175.84951782226562, | |
-37.86513900756836 | |
], | |
"params": { | |
"level": 1, | |
"start": 0, | |
"stop": 100 | |
}, | |
"width": 140.0 | |
}, | |
"List Slice.001": { | |
"bl_idname": "ListSliceNode", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": true, | |
"label": "", | |
"location": [ | |
178.1163330078125, | |
-219.30429077148438 | |
], | |
"params": { | |
"level": 1, | |
"start": 0, | |
"stop": 100 | |
}, | |
"width": 140.0 | |
}, | |
"Math": { | |
"bl_idname": "ScalarMathNode", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": true, | |
"label": "", | |
"location": [ | |
-324.4847412109375, | |
-157.0797119140625 | |
], | |
"params": { | |
"items_": "MUL" | |
}, | |
"width": 140.0 | |
}, | |
"Objects in mk2": { | |
"bl_idname": "ObjectsNodeMK2", | |
"color": [ | |
0.0, | |
0.5, | |
0.20000000298023224 | |
], | |
"height": 100.0, | |
"hide": false, | |
"label": "", | |
"location": [ | |
-821.8843383789062, | |
-16.490631103515625 | |
], | |
"params": { | |
"objects_local": "['Suzanne']" | |
}, | |
"width": 170.2286376953125 | |
}, | |
"Scripted Node Lite": { | |
"bl_idname": "SvScriptNodeLite", | |
"color": [ | |
0.0, | |
0.800000011920929, | |
0.949999988079071 | |
], | |
"height": 100.0, | |
"hide": false, | |
"label": "", | |
"location": [ | |
-529.7229614257812, | |
69.56175231933594 | |
], | |
"params": { | |
"float_list": [ | |
0.0, | |
1.0, | |
0.04000002145767212, | |
3.0, | |
4.0, | |
5.0, | |
6.0, | |
7.0, | |
8.0, | |
9.0, | |
10.0, | |
11.0, | |
12.0, | |
13.0, | |
14.0, | |
15.0, | |
16.0, | |
17.0, | |
18.0, | |
19.0, | |
20.0, | |
21.0, | |
22.0, | |
23.0, | |
24.0, | |
25.0, | |
26.0, | |
27.0, | |
28.0, | |
29.0, | |
30.0, | |
31.0 | |
], | |
"inject_params": 0, | |
"script_name": "voodoo", | |
"script_str": "\"\"\"\nin verts v d=[[]] n=1\nin faces s d=[[]] n=1\nin resize s d=1.0 n=2\nout normals v\nout midpoints v\nout vers v\nout edges s\n\"\"\"\n\nimport bpy\nimport math\n\nfrom sverchok.utils.sv_bmesh_utils import bmesh_from_pydata\n\n\n\nnormals = [[]]\nmidpoints = [[]]\nedges = [[]]\nvers = [[]]\nadd_normal = normals[0].append\nadd_midpoint = midpoints[0].append\nadd_vers = vers[0].append\nadd_edges = edges[0].append\n\nif verts and faces:\n\n bm = bmesh_from_pydata(verts, [], faces)\n bm.verts.index_update()\n bm.verts.ensure_lookup_table()\n\n add_vers([v.co[:] for v in bm.verts])\n for e in bm.edges:\n faces = e.link_faces\n add_edges([i.index for i in e.verts])\n if faces:\n x = 0\n y = 0\n z = 0\n for i in faces:\n i.normal_update()\n x += i.normal.x\n y += i.normal.y\n z += i.normal.z\n\n # normalize, and resize from there..\n v = [x, y, z]\n l = math.sqrt((v[0] * v[0]) + (v[1] * v[1]) + (v[2] * v[2]))\n avg_normal = [v[0]/l*resize, v[1]/l*resize, v[2]/l*resize]\n add_normal(avg_normal)\n \n v1, v2 = e.verts\n avg_vert = (v1.co + v2.co) / 2\n add_midpoint(avg_vert[:])" | |
}, | |
"snlite_ui": [], | |
"width": 140.0 | |
}, | |
"UV Connection": { | |
"bl_idname": "LineConnectNodeMK2", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": false, | |
"label": "", | |
"location": [ | |
-81.2830810546875, | |
230.61947631835938 | |
], | |
"params": { | |
"cicl_check_V": 1, | |
"cup_U": 1, | |
"cup_V": 0, | |
"dir_check": "V_dir", | |
"polygons": "Edges", | |
"slice_check": 1 | |
}, | |
"width": 140.0 | |
}, | |
"Vector Math": { | |
"bl_idname": "VectorMathNode", | |
"color": [ | |
0.6079999804496765, | |
0.6079999804496765, | |
0.6079999804496765 | |
], | |
"height": 100.0, | |
"hide": true, | |
"label": "ADD", | |
"location": [ | |
-231.18603515625, | |
87.71031188964844 | |
], | |
"params": { | |
"items_": "ADD", | |
"scalar_output_socket": 0 | |
}, | |
"width": 140.0 | |
}, | |
"Viewer Draw": { | |
"bl_idname": "ViewerNode2", | |
"color": [ | |
1.0, | |
0.30000001192092896, | |
0.0 | |
], | |
"height": 100.0, | |
"hide": false, | |
"label": "", | |
"location": [ | |
450.41204833984375, | |
204.53900146484375 | |
], | |
"params": { | |
"activate": 1, | |
"display_faces": 0, | |
"display_verts": 0, | |
"edge_colors": [ | |
0.9388471841812134, | |
1.0, | |
0.9352059364318848 | |
], | |
"edge_width": 1, | |
"vertex_size": 1.0 | |
}, | |
"width": 140.0 | |
}, | |
"Viewer Draw.002": { | |
"bl_idname": "ViewerNode2", | |
"color": [ | |
1.0, | |
0.30000001192092896, | |
0.0 | |
], | |
"height": 100.0, | |
"hide": false, | |
"label": "", | |
"location": [ | |
435.98095703125, | |
-63.103851318359375 | |
], | |
"params": { | |
"activate": 1, | |
"display_faces": 0, | |
"display_verts": 0, | |
"edge_colors": [ | |
0.16628164052963257, | |
1.0, | |
0.0750100389122963 | |
], | |
"edge_width": 1, | |
"vertex_size": 1.0 | |
}, | |
"width": 140.0 | |
} | |
}, | |
"update_lists": [ | |
[ | |
"Objects in mk2", | |
"Vertices", | |
"Scripted Node Lite", | |
"verts" | |
], | |
[ | |
"Objects in mk2", | |
"Polygons", | |
"Scripted Node Lite", | |
"faces" | |
], | |
[ | |
"Scripted Node Lite", | |
"normals", | |
"Vector Math", | |
"U" | |
], | |
[ | |
"Scripted Node Lite", | |
"midpoints", | |
"Vector Math", | |
"V" | |
], | |
[ | |
"Vector Math", | |
"W", | |
"UV Connection", | |
"vertices" | |
], | |
[ | |
"Scripted Node Lite", | |
"midpoints", | |
"UV Connection", | |
"vertices 1" | |
], | |
[ | |
"Int", | |
"Integer", | |
"Math", | |
"X" | |
], | |
[ | |
"Int.001", | |
"Integer", | |
"Math", | |
"Y" | |
], | |
[ | |
"UV Connection", | |
"data", | |
"List Slice", | |
"Data" | |
], | |
[ | |
"Math", | |
"float", | |
"List Slice", | |
"Stop" | |
], | |
[ | |
"UV Connection", | |
"vertices", | |
"Viewer Draw", | |
"vertices" | |
], | |
[ | |
"List Slice", | |
"Slice", | |
"Viewer Draw", | |
"edg_pol" | |
], | |
[ | |
"Scripted Node Lite", | |
"edges", | |
"List Slice.001", | |
"Data" | |
], | |
[ | |
"Int", | |
"Integer", | |
"List Slice.001", | |
"Stop" | |
], | |
[ | |
"Scripted Node Lite", | |
"vers", | |
"Viewer Draw.002", | |
"vertices" | |
], | |
[ | |
"List Slice.001", | |
"Slice", | |
"Viewer Draw.002", | |
"edg_pol" | |
] | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment