mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
CURA-5128 cleanup .gz and only leave .gcode.gz as Cura and Uranium now accept extensions with multiple periods
This commit is contained in:
parent
a0badf121a
commit
c2888529cb
@ -1625,8 +1625,13 @@ class CuraApplication(QtApplication):
|
|||||||
node.setName(os.path.basename(filename))
|
node.setName(os.path.basename(filename))
|
||||||
self.getBuildVolume().checkBoundsAndUpdate(node)
|
self.getBuildVolume().checkBoundsAndUpdate(node)
|
||||||
|
|
||||||
extension = os.path.splitext(filename)[1]
|
is_non_sliceable = False
|
||||||
if extension.lower() in self._non_sliceable_extensions:
|
filename_lower = filename.lower()
|
||||||
|
for extension in self._non_sliceable_extensions:
|
||||||
|
if filename_lower.endswith(extension):
|
||||||
|
is_non_sliceable = True
|
||||||
|
break
|
||||||
|
if is_non_sliceable:
|
||||||
self.callLater(lambda: self.getController().setActiveView("SimulationView"))
|
self.callLater(lambda: self.getController().setActiveView("SimulationView"))
|
||||||
|
|
||||||
block_slicing_decorator = BlockSlicingDecorator()
|
block_slicing_decorator = BlockSlicingDecorator()
|
||||||
|
@ -19,7 +19,7 @@ class GCodeGzReader(MeshReader):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GCodeGzReader, self).__init__()
|
super(GCodeGzReader, self).__init__()
|
||||||
self._supported_extensions = [".gcode.gz", ".gz"]
|
self._supported_extensions = [".gcode.gz"]
|
||||||
|
|
||||||
def read(self, file_name):
|
def read(self, file_name):
|
||||||
with open(file_name, "rb") as file:
|
with open(file_name, "rb") as file:
|
||||||
|
@ -18,5 +18,4 @@ def getMetaData():
|
|||||||
|
|
||||||
def register(app):
|
def register(app):
|
||||||
app.addNonSliceableExtension(".gcode.gz")
|
app.addNonSliceableExtension(".gcode.gz")
|
||||||
app.addNonSliceableExtension(".gz") # in some parts only the last extension is taken. Let's make it a non sliceable extension for now
|
|
||||||
return { "mesh_reader": GCodeGzReader.GCodeGzReader() }
|
return { "mesh_reader": GCodeGzReader.GCodeGzReader() }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user