mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Merge pull request #1809 from fieldOfView/fix_multiextruder_machinesettings
Fix multiextruder machinesettings
This commit is contained in:
commit
8efbbbb3f3
3 changed files with 21 additions and 1 deletions
|
@ -520,6 +520,10 @@ class ExtruderManager(QObject):
|
|||
|
||||
result = []
|
||||
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")
|
||||
|
||||
if value is None:
|
||||
|
|
|
@ -525,6 +525,22 @@ class MachineManager(QObject):
|
|||
|
||||
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)
|
||||
def allActiveMaterialIds(self):
|
||||
if not self._global_container_stack:
|
||||
|
|
|
@ -153,7 +153,7 @@ class MachineSettingsAction(MachineAction):
|
|||
if machine_manager.hasMaterials:
|
||||
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
||||
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
|
||||
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue