
from . import XmlMaterialProfile

from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "plugin": {
            "name": catalog.i18nc("@label", "Material Profiles"),
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."),
            "api": 3
        },
        "settings_container": {
            "mimetype": "application/x-ultimaker-material-profile"
        }
    }

def register(app):
    mime_type = MimeType(
        name = "application/x-ultimaker-material-profile",
        comment = "Ultimaker Material Profile",
        suffixes = [ "xml.fdm_material" ]
    )
    MimeTypeDatabase.addMimeType(mime_type)
    return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") }



from . import XmlMaterialProfile

from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "plugin": {
            "name": catalog.i18nc("@label", "Material Profiles"),
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."),
            "api": 3
        },
        "settings_container": {
            "type": "material",
            "mimetype": "application/x-ultimaker-material-profile"
        }
    }

def register(app):
    mime_type = MimeType(
        name = "application/x-ultimaker-material-profile",
        comment = "Ultimaker Material Profile",
        suffixes = [ "xml.fdm_material" ]
    )
    MimeTypeDatabase.addMimeType(mime_type)
    return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") }


Mark XmlMaterialProfile as type "material" so the import/export code can find it
Mark XmlMaterialProfile as type "material" so the import/export code can find it

Contributes to CURA-341

  
  from . import XmlMaterialProfile
  
  from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
  from UM.i18n import i18nCatalog
  catalog = i18nCatalog("cura")
  
  def getMetaData():
      return {
          "plugin": {
              "name": catalog.i18nc("@label", "Material Profiles"),
              "author": "Ultimaker",
              "version": "1.0",
              "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."),
              "api": 3
          },
          "settings_container": {
+             "type": "material",
              "mimetype": "application/x-ultimaker-material-profile"
          }
      }
  
  def register(app):
      mime_type = MimeType(
          name = "application/x-ultimaker-material-profile",
          comment = "Ultimaker Material Profile",
          suffixes = [ "xml.fdm_material" ]
      )
      MimeTypeDatabase.addMimeType(mime_type)
      return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") }
  
  
Mark XmlMaterialProfile as type "material" so the import/export code can find it
## Code Before:

from . import XmlMaterialProfile

from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "plugin": {
            "name": catalog.i18nc("@label", "Material Profiles"),
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."),
            "api": 3
        },
        "settings_container": {
            "mimetype": "application/x-ultimaker-material-profile"
        }
    }

def register(app):
    mime_type = MimeType(
        name = "application/x-ultimaker-material-profile",
        comment = "Ultimaker Material Profile",
        suffixes = [ "xml.fdm_material" ]
    )
    MimeTypeDatabase.addMimeType(mime_type)
    return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") }


## Instruction:
Mark XmlMaterialProfile as type "material" so the import/export code can find it
## Code After:

from . import XmlMaterialProfile

from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "plugin": {
            "name": catalog.i18nc("@label", "Material Profiles"),
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."),
            "api": 3
        },
        "settings_container": {
            "type": "material",
            "mimetype": "application/x-ultimaker-material-profile"
        }
    }

def register(app):
    mime_type = MimeType(
        name = "application/x-ultimaker-material-profile",
        comment = "Ultimaker Material Profile",
        suffixes = [ "xml.fdm_material" ]
    )
    MimeTypeDatabase.addMimeType(mime_type)
    return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") }

