Example #1
0
	def reload_slicers(self):
		"""
		Retrieves all registered :class:`~octoprint.plugin.SlicerPlugin` implementations and registers them as
		available slicers.
		"""
		plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SlicerPlugin)
		slicers = dict()
		for plugin in plugins:
			slicers[plugin.get_slicer_properties()["type"]] = plugin
		self._slicers = slicers
Example #2
0
	def reload_slicers(self):
		"""
		Retrieves all registered :class:`~octoprint.plugin.SlicerPlugin` implementations and registers them as
		available slicers.
		"""
		plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SlicerPlugin)
		slicers = dict()
		for plugin in plugins:
			try:
				slicers[plugin.get_slicer_properties()["type"]] = plugin
			except:
				self._logger.exception("Error while getting properties from slicer {}, ignoring it".format(plugin._identifier))
				continue
		self._slicers = slicers
Example #3
0
		def get_implementations(*types):
			import octoprint.plugin
			if octoprint.plugin.SlicerPlugin in types:
				return dict(("slicer_" + plugin.get_slicer_properties()["type"], plugin) for plugin in plugins)
			return dict()
Example #4
0
	def _load_slicers(self):
		plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SlicerPlugin)
		for name, plugin in plugins.items():
			if plugin.is_slicer_configured():
				self._slicers[plugin.get_slicer_properties()["type"]] = plugin