File: __init__.py

package info (click to toggle)
cura 5.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 122,920 kB
  • sloc: python: 44,572; sh: 81; xml: 32; makefile: 16
file content (34 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#Copyright (c) 2019 Ultimaker B.V.
#Cura is released under the terms of the LGPLv3 or higher.

import sys

from UM.Logger import Logger
try:
    from . import UFPReader
except ImportError:
    Logger.log("w", "Could not import UFPReader; libCharon may be missing")

from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("cura")


def getMetaData():
    return {
        "mesh_reader": [
            {
                "mime_type": "application/x-ufp",
                "extension": "ufp",
                "description": i18n_catalog.i18nc("@item:inlistbox", "Ultimaker Format Package")
            }
        ]
    }


def register(app):
    if "UFPReader.UFPReader" not in sys.modules:
        return {}

    app.addNonSliceableExtension(".ufp")
    return {"mesh_reader": UFPReader.UFPReader()}