mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Add try catch when fetching material diameter.
CURA-10183
This commit is contained in:
parent
e43c451745
commit
848b8e1398
1 changed files with 5 additions and 1 deletions
|
@ -328,7 +328,11 @@ class FlavorParser:
|
||||||
if not global_stack:
|
if not global_stack:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
self._current_filament_diameter = global_stack.extruderList[self._extruder_number].getProperty("material_diameter", "value")
|
self._current_filament_diameter = global_stack.extruderList[self._extruder_number].getProperty("material_diameter", "value")
|
||||||
|
except IndexError:
|
||||||
|
# There can be a mismatch between the number of extruders in the G-Code file and the number of extruders in the current machine.
|
||||||
|
self._current_filament_diameter = self.DEFAULT_FILAMENT_DIAMETER
|
||||||
|
|
||||||
scene_node = CuraSceneNode()
|
scene_node = CuraSceneNode()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue