mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 03:09:04 +08:00
Merge pull request #1809 from fieldOfView/fix_multiextruder_machinesettings
Fix multiextruder machinesettings
This commit is contained in:
commit
8efbbbb3f3
@ -520,6 +520,10 @@ class ExtruderManager(QObject):
|
|||||||
|
|
||||||
result = []
|
result = []
|
||||||
for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):
|
for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):
|
||||||
|
# only include values from extruders that are "active" for the current machine instance
|
||||||
|
if int(extruder.getMetaDataEntry("position")) >= global_stack.getProperty("machine_extruder_count", "value"):
|
||||||
|
continue
|
||||||
|
|
||||||
value = extruder.getRawProperty(key, "value")
|
value = extruder.getRawProperty(key, "value")
|
||||||
|
|
||||||
if value is None:
|
if value is None:
|
||||||
|
@ -525,6 +525,22 @@ class MachineManager(QObject):
|
|||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@pyqtProperty("QVariantMap", notify = activeVariantChanged)
|
||||||
|
def allActiveVariantIds(self):
|
||||||
|
if not self._global_container_stack:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
result = {}
|
||||||
|
|
||||||
|
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
||||||
|
variant_container = stack.variant
|
||||||
|
if not variant_container:
|
||||||
|
continue
|
||||||
|
|
||||||
|
result[stack.getId()] = variant_container.getId()
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
@pyqtProperty("QVariantMap", notify = activeMaterialChanged)
|
@pyqtProperty("QVariantMap", notify = activeMaterialChanged)
|
||||||
def allActiveMaterialIds(self):
|
def allActiveMaterialIds(self):
|
||||||
if not self._global_container_stack:
|
if not self._global_container_stack:
|
||||||
|
@ -153,7 +153,7 @@ class MachineSettingsAction(MachineAction):
|
|||||||
if machine_manager.hasMaterials:
|
if machine_manager.hasMaterials:
|
||||||
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
||||||
if machine_manager.hasVariants:
|
if machine_manager.hasVariants:
|
||||||
extruder_variant_id = machine_manager.activeVariantIds[0]
|
extruder_variant_id = machine_manager.allActiveVariantIds[extruder_manager.extruderIds["0"]]
|
||||||
|
|
||||||
# Copy any settable_per_extruder setting value from the extruders to the global stack
|
# Copy any settable_per_extruder setting value from the extruders to the global stack
|
||||||
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user