mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-25 15:48:16 +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
|
# \return \type{List[ContainerStack]} a list of
|
||||||
def getActiveExtruderStacks(self) -> List["ExtruderStack"]:
|
def getActiveExtruderStacks(self) -> List["ExtruderStack"]:
|
||||||
global_stack = Application.getInstance().getGlobalContainerStack()
|
global_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
if not global_stack:
|
||||||
|
return None
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
machine_extruder_count = global_stack.getProperty("machine_extruder_count", "value")
|
if global_stack.getId() in self._extruder_trains:
|
||||||
|
|
||||||
if global_stack and global_stack.getId() in self._extruder_trains:
|
|
||||||
for extruder in sorted(self._extruder_trains[global_stack.getId()]):
|
for extruder in sorted(self._extruder_trains[global_stack.getId()]):
|
||||||
result.append(self._extruder_trains[global_stack.getId()][extruder])
|
result.append(self._extruder_trains[global_stack.getId()][extruder])
|
||||||
|
|
||||||
|
machine_extruder_count = global_stack.getProperty("machine_extruder_count", "value")
|
||||||
|
|
||||||
return result[:machine_extruder_count]
|
return result[:machine_extruder_count]
|
||||||
|
|
||||||
def __globalContainerStackChanged(self) -> None:
|
def __globalContainerStackChanged(self) -> None:
|
||||||
|
@ -498,6 +498,7 @@ class MachineManager(QObject):
|
|||||||
@pyqtProperty("QVariantList", notify=activeVariantChanged)
|
@pyqtProperty("QVariantList", notify=activeVariantChanged)
|
||||||
def activeVariantNames(self) -> List[str]:
|
def activeVariantNames(self) -> List[str]:
|
||||||
result = []
|
result = []
|
||||||
|
|
||||||
active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks()
|
active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks()
|
||||||
if active_stacks is not None:
|
if active_stacks is not None:
|
||||||
for stack in active_stacks:
|
for stack in active_stacks:
|
||||||
@ -510,6 +511,7 @@ class MachineManager(QObject):
|
|||||||
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
||||||
def activeMaterialNames(self) -> List[str]:
|
def activeMaterialNames(self) -> List[str]:
|
||||||
result = []
|
result = []
|
||||||
|
|
||||||
active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks()
|
active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks()
|
||||||
if active_stacks is not None:
|
if active_stacks is not None:
|
||||||
for stack in active_stacks:
|
for stack in active_stacks:
|
||||||
@ -530,6 +532,7 @@ class MachineManager(QObject):
|
|||||||
@pyqtProperty("QVariantMap", notify = activeVariantChanged)
|
@pyqtProperty("QVariantMap", notify = activeVariantChanged)
|
||||||
def allActiveVariantIds(self) -> Dict[str, str]:
|
def allActiveVariantIds(self) -> Dict[str, str]:
|
||||||
result = {}
|
result = {}
|
||||||
|
|
||||||
active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||||
if active_stacks is not None: #If we have a global stack.
|
if active_stacks is not None: #If we have a global stack.
|
||||||
for stack in active_stacks:
|
for stack in active_stacks:
|
||||||
@ -548,10 +551,8 @@ class MachineManager(QObject):
|
|||||||
@pyqtProperty("QVariantMap", notify = activeMaterialChanged)
|
@pyqtProperty("QVariantMap", notify = activeMaterialChanged)
|
||||||
def allActiveMaterialIds(self) -> Dict[str, str]:
|
def allActiveMaterialIds(self) -> Dict[str, str]:
|
||||||
result = {}
|
result = {}
|
||||||
|
|
||||||
active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
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
|
if active_stacks is not None: # If we have extruder stacks
|
||||||
for stack in active_stacks:
|
for stack in active_stacks:
|
||||||
material_container = stack.material
|
material_container = stack.material
|
||||||
|
@ -59,7 +59,9 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
|
|||||||
version_file = zipfile.ZipInfo("Cura/version.ini")
|
version_file = zipfile.ZipInfo("Cura/version.ini")
|
||||||
version_config_parser = configparser.ConfigParser()
|
version_config_parser = configparser.ConfigParser()
|
||||||
version_config_parser.add_section("versions")
|
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_file_string = StringIO()
|
||||||
version_config_parser.write(version_file_string)
|
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.
|
Extruder tabs have become buttons and icons have been updated.
|
||||||
|
|
||||||
*Add an "Export to Cura" button in SOLIDWORKS
|
*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
|
*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.
|
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/send_slice_info", True)
|
||||||
Preferences.getInstance().addPreference("info/asked_send_slice_info", False)
|
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."),
|
self.send_slice_info_message = Message(catalog.i18nc("@info", "Cura collects anonymised slicing statistics. You can disable this in the preferences."),
|
||||||
lifetime = 0,
|
lifetime = 0,
|
||||||
dismissable = False,
|
dismissable = False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user