From eff32ea8c2ba139789540259637f4630d8188336 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 15 Jul 2024 12:38:47 +0200 Subject: [PATCH] Order backend plugins by name The engine processes the plugins based on the order they were given in. By ordering them beforehand, we ensure that they will always be processed with the same logic. CURA-10914 --- plugins/CuraEngineBackend/StartSliceJob.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 9caadbdff6..7a294c89a8 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -366,7 +366,12 @@ class StartSliceJob(Job): for extruder_stack in global_stack.extruderList: self._buildExtruderMessage(extruder_stack) - for plugin in CuraApplication.getInstance().getBackendPlugins(): + backend_plugins = CuraApplication.getInstance().getBackendPlugins() + + # Sort backend plugins by name. Not a very good strategy, but at least it is repeatable. This will be improved later. + backend_plugins = sorted(backend_plugins, key=lambda backend_plugin: backend_plugin.getId()) + + for plugin in backend_plugins: if not plugin.usePlugin(): continue for slot in plugin.getSupportedSlots():