mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Add support for reading glTF files
Contributes to issue CURA-6739.
This commit is contained in:
parent
3a3ba6d590
commit
e761b2c2a7
2 changed files with 23 additions and 1 deletions
|
@ -27,7 +27,7 @@ class TrimeshReader(MeshReader):
|
|||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
||||
self._supported_extensions = [".dae", ".ply"]
|
||||
self._supported_extensions = [".dae", ".gltf", ".glb", ".ply"]
|
||||
MimeTypeDatabase.addMimeType(
|
||||
MimeType(
|
||||
name = "model/vnd.collada+xml",
|
||||
|
@ -35,6 +35,20 @@ class TrimeshReader(MeshReader):
|
|||
suffixes = ["dae"]
|
||||
)
|
||||
)
|
||||
MimeTypeDatabase.addMimeType(
|
||||
MimeType(
|
||||
name = "model/gltf-binary",
|
||||
comment = "glTF Binary",
|
||||
suffixes = ["glb"]
|
||||
)
|
||||
)
|
||||
MimeTypeDatabase.addMimeType(
|
||||
MimeType(
|
||||
name = "model/gltf+json",
|
||||
comment = "glTF Embedded JSON",
|
||||
suffixes = ["gltf"]
|
||||
)
|
||||
)
|
||||
MimeTypeDatabase.addMimeType(
|
||||
MimeType(
|
||||
name = "application/x-ply", # Wikipedia lists the MIME type as "text/plain" but that won't do as it's not unique to PLY files.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue