diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2022-03-13 14:49:28 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2022-03-13 13:32:24 +0000 |
commit | cd06e616a32206adca1fce2b648e3ea9bbbe4f85 (patch) | |
tree | 4ef4b6b28c597fc2d2a666f294674c267ba85cde | |
parent | b36e7aefab12e5703c8ecdf4532cd85404d22884 (diff) | |
download | shared-mime-info-cd06e616a32206adca1fce2b648e3ea9bbbe4f85.tar.gz |
model/obj: add mtllib and Blender comment based magic
Blender produced obj files, such as the one in our test suite, can have
a first line comment like "# Blender v2.82 (sub 7) OBJ File: ''"
-rw-r--r-- | data/freedesktop.org.xml.in | 4 | ||||
-rw-r--r-- | tests/mime-detection/list | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index 8edf4248..ae05d58a 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -5886,6 +5886,10 @@ command to generate the output files. <mime-type type="model/obj"> <comment>OBJ 3D model</comment> <sub-class-of type="text/plain"/> + <magic priority="50"> + <match type="string" value=" OBJ File: '" offset="0:64"/> + <match type="string" value="mtllib " offset="0:256"/> + </magic> <glob pattern="*.obj"/> </mime-type> <mime-type type="model/mtl"> diff --git a/tests/mime-detection/list b/tests/mime-detection/list index 3cbfe16c..d2aed529 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -852,7 +852,7 @@ ascii.stl model/stl test.gcode text/x.gcode ox 20mm_Box.gx text/x-gcode-gx # Converted from binary.stl with Blender -test.obj model/obj xxx +test.obj model/obj x test.mtl model/mtl # Virtualization disk images |