Created
May 19, 2014 17:48
-
-
Save zeffii/a27e2ba87a05983b824a to your computer and use it in GitHub Desktop.
allows nested lists.
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
def sv_main(vc=[], vf=[]): | |
in_sockets = [ | |
['v', 'vc', vc], | |
['v', 'vf', vf]] | |
edges_out = [] | |
verts_out = [] | |
for idx, vz in enumerate(vf[0]): | |
b = [] | |
b.append(vz) | |
b.extend(vc[idx]) | |
verts_out.append(b) | |
edges_out.append([(0,n+1) for n in range(len(b)-1)]) | |
# out boilerplate | |
out_sockets = [ | |
['v', 'Vecs', verts_out], | |
['s', 'Edges', edges_out] | |
] | |
return in_sockets, out_sockets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment