Add the skeleton of the plugin

Contributes to CURA-5155.
This commit is contained in:
Diego Prado Gesto 2019-03-08 21:57:07 +01:00
parent 8c41bc86d2
commit 412bcc9b90
5 changed files with 75 additions and 3 deletions

View file

@ -0,0 +1,24 @@
# 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)