Safeguard against decrease in number of extruders

When the painted model goes from a machine with higher number of extruders to a lower number of extruders with painted data, adding the same safeguard as the limit to extruder settings to prevent crash
This commit is contained in:
HellAholic 2025-10-21 09:04:46 +02:00
parent 3d2741a985
commit 549b040632

View file

@ -257,6 +257,8 @@ class ExtruderManager(QObject):
painted_extruders = node.callDecoration("getPaintedExtruders")
if painted_extruders is not None:
for extruder_nr in painted_extruders:
if str(extruder_nr) not in self.extruderIds:
extruder_nr = int(self._application.getMachineManager().defaultExtruderPosition)
used_extruder_stack_ids.add(self.extruderIds[str(extruder_nr)])
# Check limit to extruders