Sorry, here is the complete __init__.py
import sys from UM.Logger import Logger try: from . import ChituCodeWriter except ImportError: Logger.log("w", "Could not import ChituCodeWriter") from UM.i18n import i18nCatalog #To translate the file format description. from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag. i18n_catalog = i18nCatalog("cura") def getMetaData(): if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": { "output": [ { "mime_type": "text/chitu-g-code", "mode": MeshWriter.OutputMode.TextMode, "extension": "chitu", "description": i18n_catalog.i18nc("@item:inlistbox", "Chitu Code") } ] } } def register(app): if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": ChituCodeWriter.ChituCodeWriter() }
How can I be sure that the new mimetype is known by cura?
I don't see any signs that my plugin is used.
Regards
Daniel
Edited by Daniel26
Recommended Posts
ahoeben 1,990
Your __init__.py needs a bit more (some imports and a register() function), but generally, yes: that is it.
Link to post
Share on other sites