Jump to content

andries_coastruction

Member
  • Posts

    3
  • Joined

  • Last visited

Personal Information

  • 3D printer
    Other 3D printer

andries_coastruction's Achievements

0

Reputation

  1. awesome! thanks! that sheds a lot of light on the matter. In general, I find the information for plugin development quite hard to find...
  2. Also when I try to query the machine name of my Custom FFF printer, i returns `Unknown`, even though it clearly has a name: machine_name = global_container_stack.getProperty("machine_name", "value") self.log('d', f"machine_name: {machine_name}") prints: `machine_name: Unknown.` with the machine config looking like this: [general] version = 5 name = Idebroken 25_staiger id = Idebroken 25_staiger [metadata] setting_version = 20 type = machine group_id = 8df622d3-210a-459d-a213-265b216eeef4 [containers] 0 = Idebroken 25_staiger_user 1 = custom_waterprofile_t2.5_#2 2 = empty_intent 3 = empty_quality 4 = empty_material 5 = empty_variant 6 = Idebroken 25_staiger_settings 7 = custom
  3. I am trying to use the value of `line_width` in my custom post-processor script, however, the value always returns 0.4, even if I change it to something else in the GUI. I even tried a clean install with only one printer with everything set to something else than 0.4, however, I still get this value when querying line_width. I use the following code (also attached as plugin): from collections import OrderedDict from UM.Extension import Extension from UM.Application import Application from UM.Settings.SettingDefinition import SettingDefinition from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Logger import Logger class TestPlugin(Extension): def log(self, level, message): Logger.log(level, f"TEST: {message}") def __init__(self): super().__init__() self._application = Application.getInstance() self._i18n_catalog = None self._application.getOutputDeviceManager().writeStarted.connect(self._filterGcode) def _filterGcode(self, output_device): scene = self._application.getController().getScene() self.log('d', "trying the global container") global_container_stack = self._application.getGlobalContainerStack() if not global_container_stack: self.log('d', "no global container stack found") return # get setting from Cura layer_height = global_container_stack.getProperty("layer_height", "value") self.log('d', f"Layer height: {layer_height}") I suspect that I somehow the line_width in the global container stack has other values as well, however, I have very little idea of how the container structure is build up. Should I be using a different container? What am I doing wrong? And if somebody could explain to me, what is even a container?? TestPlugin.zip
×
×
  • Create New...