mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-24 23:29:00 +08:00
Merge branch 'master' of https://github.com/Ultimaker/Cura
This commit is contained in:
commit
b6e84fb814
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user