mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Possible to distinguish between empty and corrupt 3MF.
Otherwise the user could infer valid, but empty workspace is corrupt. CURA-7996
This commit is contained in:
parent
1e155662d9
commit
6256bf3a4d
1 changed files with 7 additions and 0 deletions
|
@ -51,6 +51,10 @@ class ThreeMFReader(MeshReader):
|
|||
self._root = None
|
||||
self._base_name = ""
|
||||
self._unit = None
|
||||
self._empty_project = False
|
||||
|
||||
def emptyFileHintSet(self) -> bool:
|
||||
return self._empty_project
|
||||
|
||||
def _createMatrixFromTransformationString(self, transformation: str) -> Matrix:
|
||||
if transformation == "":
|
||||
|
@ -257,6 +261,9 @@ class ThreeMFReader(MeshReader):
|
|||
|
||||
result.append(um_node)
|
||||
|
||||
if len(result) == 0:
|
||||
self._empty_project = True
|
||||
|
||||
except Exception:
|
||||
Logger.logException("e", "An exception occurred in 3mf reader.")
|
||||
return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue