Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions plugins/PostProcessingPlugin/scripts/PurgeLinesAndUnload.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class Position(tuple, Enum):

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
Expand All @@ -56,9 +57,6 @@ def __init__(self):
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()
Expand Down
Loading