diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 34b283107d..32e3867300 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -356,14 +356,16 @@ class ExtruderManager(QObject): # \return \type{List[ContainerStack]} a list of def getActiveExtruderStacks(self) -> List["ExtruderStack"]: global_stack = Application.getInstance().getGlobalContainerStack() + if not global_stack: + return None result = [] - machine_extruder_count = global_stack.getProperty("machine_extruder_count", "value") - - if global_stack and global_stack.getId() in self._extruder_trains: + if global_stack.getId() in self._extruder_trains: for extruder in sorted(self._extruder_trains[global_stack.getId()]): result.append(self._extruder_trains[global_stack.getId()][extruder]) + machine_extruder_count = global_stack.getProperty("machine_extruder_count", "value") + return result[:machine_extruder_count] def __globalContainerStackChanged(self) -> None: diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index f1bb8b6648..afd038b45d 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -498,6 +498,7 @@ class MachineManager(QObject): @pyqtProperty("QVariantList", notify=activeVariantChanged) def activeVariantNames(self) -> List[str]: result = [] + active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() if active_stacks is not None: for stack in active_stacks: @@ -510,6 +511,7 @@ class MachineManager(QObject): @pyqtProperty("QVariantList", notify = activeMaterialChanged) def activeMaterialNames(self) -> List[str]: result = [] + active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() if active_stacks is not None: for stack in active_stacks: @@ -530,6 +532,7 @@ class MachineManager(QObject): @pyqtProperty("QVariantMap", notify = activeVariantChanged) def allActiveVariantIds(self) -> Dict[str, str]: result = {} + active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks() if active_stacks is not None: #If we have a global stack. for stack in active_stacks: @@ -548,10 +551,8 @@ class MachineManager(QObject): @pyqtProperty("QVariantMap", notify = activeMaterialChanged) def allActiveMaterialIds(self) -> Dict[str, str]: result = {} + active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks() - - result[self._global_container_stack.getId()] = self._global_container_stack.material.getId() - if active_stacks is not None: # If we have extruder stacks for stack in active_stacks: material_container = stack.material diff --git a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py index 9c143f0057..4f1ff9494f 100644 --- a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py +++ b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py @@ -59,7 +59,9 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter): version_file = zipfile.ZipInfo("Cura/version.ini") version_config_parser = configparser.ConfigParser() version_config_parser.add_section("versions") - version_config_parser.set("versions", "cura_version", Application.getStaticVersion()) + version_config_parser.set("versions", "cura_version", Application.getInstance().getVersion()) + version_config_parser.set("versions", "build_type", Application.getInstance().getBuildType()) + version_config_parser.set("versions", "is_debug_mode", str(Application.getInstance().getIsDebugMode())) version_file_string = StringIO() version_config_parser.write(version_file_string) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 673f2ad7c6..de895b3e41 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -109,7 +109,7 @@ The build plate now shows graduations of 10 mm and 1 mm for easy model positioni Extruder tabs have become buttons and icons have been updated. *Add an "Export to Cura" button in SOLIDWORKS -SOLIDWORKS plugin can now be installed using an automatic installer. +A macro can be added to your SOLIDWORKS installation that loads your model into Ultimaker Cura. *Siemens NX macro When a user updates models in Siemens NX and clicks the button, the updated models replace the models opened in Ultimaker Cura. diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 79963a4740..67f977adce 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -39,7 +39,7 @@ class SliceInfo(Extension): Preferences.getInstance().addPreference("info/send_slice_info", True) Preferences.getInstance().addPreference("info/asked_send_slice_info", False) - if not Preferences.getInstance().getValue("info/asked_send_slice_info"): + if not Preferences.getInstance().getValue("info/asked_send_slice_info") and Preferences.getInstance().getValue("info/send_slice_info"): self.send_slice_info_message = Message(catalog.i18nc("@info", "Cura collects anonymised slicing statistics. You can disable this in the preferences."), lifetime = 0, dismissable = False,