mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:15:51 +08:00
We now throw an exception when trying to read legacy profile when multi extrusion machine is selected
CURA-2421
This commit is contained in:
parent
52b65009d1
commit
48fc957695
@ -67,12 +67,13 @@ class LegacyProfileReader(ProfileReader):
|
|||||||
if file_name.split(".")[-1] != "ini":
|
if file_name.split(".")[-1] != "ini":
|
||||||
return None
|
return None
|
||||||
|
|
||||||
multi_extrusion = Application.getInstance().getGlobalContainerStack().getProperty("machine_extruder_count","value") > 1
|
multi_extrusion = Application.getInstance().getGlobalContainerStack().getProperty("machine_extruder_count", "value") > 1
|
||||||
if multi_extrusion:
|
if multi_extrusion:
|
||||||
Logger.log("e", "Unable to create legacy profile %s. Multi extrusion is not supported", file_name)
|
Logger.log("e", "Unable to import legacy profile %s. Multi extrusion is not supported", file_name)
|
||||||
return None
|
raise Exception("Unable to import legacy profile. Multi extrusion is not supported")
|
||||||
|
|
||||||
Logger.log("i", "Importing legacy profile from file " + file_name + ".")
|
Logger.log("i", "Importing legacy profile from file " + file_name + ".")
|
||||||
profile = InstanceContainer("Imported Legacy Profile") #Create an empty profile.
|
profile = InstanceContainer("Imported Legacy Profile") # Create an empty profile.
|
||||||
|
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user