mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 04:37:51 -06:00
Update PurgeLinesAndUnload.py
Fixes an exception thrown upon a clean start.
This commit is contained in:
parent
6ac622826e
commit
db8a625d8f
1 changed files with 4 additions and 3 deletions
|
@ -37,6 +37,10 @@ class PurgeLinesAndUnload(Script):
|
|||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def initialize(self) -> None:
|
||||
super().initialize()
|
||||
# Get required values from the global stack and set default values for the script
|
||||
self.global_stack = Application.getInstance().getGlobalContainerStack()
|
||||
self.extruder = self.global_stack.extruderList
|
||||
self.end_purge_location = None
|
||||
|
@ -56,9 +60,6 @@ class PurgeLinesAndUnload(Script):
|
|||
self.machine_back = self.machine_depth - 1.0
|
||||
self.start_x = None
|
||||
self.start_y = None
|
||||
|
||||
def initialize(self) -> None:
|
||||
super().initialize()
|
||||
# Get the StartUp Gcode from Cura and attempt to catch if it contains purge lines. Message the user if an extrusion is in the startup.
|
||||
startup_gcode = self.global_stack.getProperty("machine_start_gcode", "value")
|
||||
start_lines = startup_gcode.splitlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue