Closed zeffii closed 10 years ago
considering parsing the function argument list once,
import re
s = "def sv_main(num_verts=20, radius=5, danger_list=[]):"
r = re.compile('(?P<name>\w+)=(?P<defval>.*?|\[\])[,\)]')
k = [m.groupdict() for m in r.finditer(s)]
print(k)
>>> [
{'defval': '20', 'name': 'num_verts'},
{'defval': '5', 'name': 'radius'},
{'defval': '[]', 'name': 'danger_list'}
]
script node give error if name of socker not equal to socket veriable name... i cannot find what is wrong.
oops! will attempt to fix tomorrow ( i like to use same variable names as socket names )
i commited interface changes to script node
fixed.
node_Script.py needs a small fix to send the default value if one of the sockets isn't connected. Either that or call
node_func(**args)
This is a minor bug, but I hope to fix it later today.