CuraPackageManager.py 798 B

1234567891011121314151617
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from cura.CuraApplication import CuraApplication #To find some resource types.
  4. from UM.PackageManager import PackageManager #The class we're extending.
  5. from UM.Resources import Resources #To find storage paths for some resource types.
  6. class CuraPackageManager(PackageManager):
  7. def __init__(self, application, parent = None):
  8. super().__init__(application, parent)
  9. def initialize(self):
  10. self._installation_dirs_dict["materials"] = Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer)
  11. self._installation_dirs_dict["qualities"] = Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer)
  12. super().initialize()