mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-21 13:19:37 +08:00
24 lines
683 B
Python
24 lines
683 B
Python
# Copyright (c) 2019 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
from UM.Mesh.MeshReader import MeshReader
|
|
from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
|
|
from cura.Scene.CuraSceneNode import CuraSceneNode
|
|
|
|
|
|
class UFPReader(MeshReader):
|
|
|
|
def __init__(self) -> None:
|
|
super().__init__()
|
|
|
|
MimeTypeDatabase.addMimeType(
|
|
MimeType(
|
|
name = "application/x-ufp",
|
|
comment = "Cura UFP File",
|
|
suffixes = ["ufp"]
|
|
)
|
|
)
|
|
self._supported_extensions = [".ufp"]
|
|
|
|
def _read(self, file_name: str) -> CuraSceneNode:
|
|
print("Reading", file_name) |