Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2019-08-29 16:40:49 +0300
committerGhostkeeper <rubend@tutanota.com>2019-08-29 16:40:49 +0300
commit714e6f191d4625d1f7ae039ee90044ba790b4e0d (patch)
treee606fcf82773823950f7a0cee881d4432db7f79b /plugins/TrimeshReader
parent41c5b87eaed328b2bde563bc1e46df9de1af252a (diff)
Add support for OpenCTM
Contributes to issue CURA-6739.
Diffstat (limited to 'plugins/TrimeshReader')
-rw-r--r--plugins/TrimeshReader/TrimeshReader.py9
-rw-r--r--plugins/TrimeshReader/__init__.py4
2 files changed, 12 insertions, 1 deletions
diff --git a/plugins/TrimeshReader/TrimeshReader.py b/plugins/TrimeshReader/TrimeshReader.py
index c22d98872f..5dbbfb16de 100644
--- a/plugins/TrimeshReader/TrimeshReader.py
+++ b/plugins/TrimeshReader/TrimeshReader.py
@@ -27,7 +27,14 @@ class TrimeshReader(MeshReader):
def __init__(self) -> None:
super().__init__()
- self._supported_extensions = [".dae", ".gltf", ".glb", ".ply"]
+ self._supported_extensions = [".ctm", ".dae", ".gltf", ".glb", ".ply"]
+ MimeTypeDatabase.addMimeType(
+ MimeType(
+ name = "application/x-ctm",
+ comment = "Open Compressed Triangle Mesh",
+ suffixes = ["ctm"]
+ )
+ )
MimeTypeDatabase.addMimeType(
MimeType(
name = "model/vnd.collada+xml",
diff --git a/plugins/TrimeshReader/__init__.py b/plugins/TrimeshReader/__init__.py
index 8e6d95983f..06962fa29f 100644
--- a/plugins/TrimeshReader/__init__.py
+++ b/plugins/TrimeshReader/__init__.py
@@ -11,6 +11,10 @@ def getMetaData():
return {
"mesh_reader": [
{
+ "extension": "ctm",
+ "description": i18n_catalog.i18nc("@item:inlistbox", "Open Compressed Triangle Mesh")
+ },
+ {
"extension": "dae",
"description": i18n_catalog.i18nc("@item:inlistbox", "COLLADA Digital Asset Exchange")
},