Update SearchAndReplace.py

Change variable name from cura_app to global_stack.
This commit is contained in:
GregValiant 2025-01-12 10:04:39 -05:00
parent be509b6696
commit 5678c64f18

View file

@ -96,8 +96,8 @@ class SearchAndReplace(Script):
}""" }"""
def execute(self, data): def execute(self, data):
cura_app = Application.getInstance().getGlobalContainerStack() global_stack = Application.getInstance().getGlobalContainerStack()
extruder = cura_app.extruderList extruder = global_stack.extruderList
retract_enabled = bool(extruder[0].getProperty("retraction_enable", "value")) retract_enabled = bool(extruder[0].getProperty("retraction_enable", "value"))
# If retractions are enabled then the CuraEngine inserts a single data item for the retraction at the end of the last layer # If retractions are enabled then the CuraEngine inserts a single data item for the retraction at the end of the last layer
# 'top_layer' accounts for that # 'top_layer' accounts for that
@ -140,6 +140,7 @@ class SearchAndReplace(Script):
raft_layers = 0 raft_layers = 0
except: except:
pass pass
#Determine the actual start and end indexes of the data #Determine the actual start and end indexes of the data
try: try:
if not enable_layer_search: if not enable_layer_search: