🐛 Fix context variables in GCODE scripts from multiple plugins (#4757)
* provide variables from multiple plugins * 🎨 Fix linter issues --------- Co-authored-by: Gina Häußge <gina@octoprint.org> Closes #4756
This commit is contained in:
1 parent
f5e3588357
commit
388e45ae11
2 files changed
+3
-1
No files matched your search
@@ -178,6 +178,7 @@ date of first contribution):
|
||||
* [Shyam Sunder](https://github.com/sgsunder)
|
||||
* [Conny Rasch](https://github.com/CMR-DEV)
|
||||
* [Christopher Perrin](https://github.com/cperrin88)
|
||||
* [Martin Bartsch](https://github.com/kaenguruhs)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
@@ -36,6 +36,7 @@ from octoprint.util import (
|
||||
TypeAlreadyInQueue,
|
||||
TypedQueue,
|
||||
chunks,
|
||||
dict_merge,
|
||||
filter_non_ascii,
|
||||
filter_non_utf8,
|
||||
get_bom,
|
||||
@@ -1380,7 +1381,7 @@ class MachineCom:
|
||||
|
||||
if len(retval) == 3:
|
||||
variables = retval[2]
|
||||
context.update({"plugins": {name: variables}})
|
||||
context = dict_merge(context, {"plugins": {name: variables}})
|
||||
|
||||
template = settings().loadScript("gcode", scriptName, context=context)
|
||||
if template is None:
|
||||
|
||||
Reference in new issue
Block a user