Skip to content

Commit

Permalink
FIX: now components are reading the inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Feb 12, 2024
1 parent d8c6287 commit 5afde90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions GH/PyGH/components/scriptsynccpy/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,9 @@ def RunScript(self, btn: bool, x: float):
self.event_fire_msg
).start()

# run the script (* we pass the globals() to the locals() to use the modules
# and nested functions in the script)
# add to the globals all the input parameters of the component (the locals)
globals().update(locals())

res = self.safe_exec(self.path, None, globals())
self.is_success = True
return
Expand Down
2 changes: 1 addition & 1 deletion VSCode/scriptsync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can execute the folloing languages from VSCode with script-sync:

| | CPython | IronPython | C# |
| ------------- | ------ | ----------- | -- |
| Rhino ||||
| Rhino ||| |
| Grasshopper || | |


Expand Down

0 comments on commit 5afde90

Please sign in to comment.