Skip to content

Commit 5afde90

Browse files
committed
FIX: now components are reading the inputs
1 parent d8c6287 commit 5afde90

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

GH/PyGH/components/scriptsynccpy/code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ def RunScript(self, btn: bool, x: float):
368368
self.event_fire_msg
369369
).start()
370370

371-
# run the script (* we pass the globals() to the locals() to use the modules
372-
# and nested functions in the script)
371+
# add to the globals all the input parameters of the component (the locals)
372+
globals().update(locals())
373+
373374
res = self.safe_exec(self.path, None, globals())
374375
self.is_success = True
375376
return

VSCode/scriptsync/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can execute the folloing languages from VSCode with script-sync:
99

1010
| | CPython | IronPython | C# |
1111
| ------------- | ------ | ----------- | -- |
12-
| Rhino ||||
12+
| Rhino ||| |
1313
| Grasshopper || | |
1414

1515

0 commit comments

Comments
 (0)