mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
90fa49b6a1
10 changed files with 18 additions and 15 deletions
|
@ -1227,7 +1227,7 @@ class MachineManager(QObject):
|
||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
|
|
||||||
@pyqtSlot(str, "QVariant")
|
@pyqtSlot(str, "QVariant")
|
||||||
def setVariantGroup(self, position, container_node):
|
def setVariant(self, position, container_node):
|
||||||
position = str(position)
|
position = str(position)
|
||||||
self.blurSettings.emit()
|
self.blurSettings.emit()
|
||||||
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
|
||||||
|
|
|
@ -3,13 +3,14 @@ from typing import Any, Optional
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Decorators import override
|
from UM.Decorators import override
|
||||||
from UM.Settings.Interfaces import PropertyEvaluationContext
|
from UM.Settings.Interfaces import PropertyEvaluationContext
|
||||||
from UM.Settings.ContainerStack import ContainerStack
|
|
||||||
from UM.Settings.SettingInstance import InstanceState
|
from UM.Settings.SettingInstance import InstanceState
|
||||||
|
|
||||||
|
from .CuraContainerStack import CuraContainerStack
|
||||||
|
|
||||||
class PerObjectContainerStack(ContainerStack):
|
|
||||||
|
|
||||||
@override(ContainerStack)
|
class PerObjectContainerStack(CuraContainerStack):
|
||||||
|
|
||||||
|
@override(CuraContainerStack)
|
||||||
def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> Any:
|
def getProperty(self, key: str, property_name: str, context: Optional[PropertyEvaluationContext] = None) -> Any:
|
||||||
if context is None:
|
if context is None:
|
||||||
context = PropertyEvaluationContext()
|
context = PropertyEvaluationContext()
|
||||||
|
@ -51,8 +52,8 @@ class PerObjectContainerStack(ContainerStack):
|
||||||
context.popContainer()
|
context.popContainer()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@override(ContainerStack)
|
@override(CuraContainerStack)
|
||||||
def setNextStack(self, stack: ContainerStack):
|
def setNextStack(self, stack: CuraContainerStack):
|
||||||
super().setNextStack(stack)
|
super().setNextStack(stack)
|
||||||
|
|
||||||
# trigger signal to re-evaluate all default settings
|
# trigger signal to re-evaluate all default settings
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
|
||||||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||||
from UM.Signal import Signal, signalemitter
|
from UM.Signal import Signal, signalemitter
|
||||||
from UM.Settings.InstanceContainer import InstanceContainer
|
from UM.Settings.InstanceContainer import InstanceContainer
|
||||||
|
@ -33,9 +32,11 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._stack = PerObjectContainerStack(stack_id = "per_object_stack_" + str(id(self)))
|
self._stack = PerObjectContainerStack(container_id = "per_object_stack_" + str(id(self)))
|
||||||
self._stack.setDirty(False) # This stack does not need to be saved.
|
self._stack.setDirty(False) # This stack does not need to be saved.
|
||||||
self._stack.addContainer(InstanceContainer(container_id = "SettingOverrideInstanceContainer"))
|
user_container = InstanceContainer(container_id = "SettingOverrideInstanceContainer")
|
||||||
|
user_container.addMetaDataEntry("type", "user")
|
||||||
|
self._stack.userChanges = user_container
|
||||||
self._extruder_stack = ExtruderManager.getInstance().getExtruderStack(0).getId()
|
self._extruder_stack = ExtruderManager.getInstance().getExtruderStack(0).getId()
|
||||||
|
|
||||||
self._is_non_printing_mesh = False
|
self._is_non_printing_mesh = False
|
||||||
|
|
|
@ -216,7 +216,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
|
|
||||||
@pyqtProperty("QVariantList", notify=printJobsChanged)
|
@pyqtProperty("QVariantList", notify=printJobsChanged)
|
||||||
def queuedPrintJobs(self) -> List[PrintJobOutputModel]:
|
def queuedPrintJobs(self) -> List[PrintJobOutputModel]:
|
||||||
return [print_job for print_job in self._print_jobs if print_job.assignedPrinter is None or print_job.state == "queued"]
|
return [print_job for print_job in self._print_jobs if print_job.state == "queued"]
|
||||||
|
|
||||||
@pyqtProperty("QVariantList", notify=printJobsChanged)
|
@pyqtProperty("QVariantList", notify=printJobsChanged)
|
||||||
def activePrintJobs(self) -> List[PrintJobOutputModel]:
|
def activePrintJobs(self) -> List[PrintJobOutputModel]:
|
||||||
|
|
|
@ -32,7 +32,7 @@ Menu
|
||||||
}
|
}
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
Cura.MachineManager.setVariantGroup(menu.extruderIndex, model.container_node);
|
Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,7 @@ Menu
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:inmenu", "Show All Settings")
|
text: catalog.i18nc("@action:inmenu", "Show All Settings")
|
||||||
checkable: true
|
checkable: false
|
||||||
checked: showingAllSettings
|
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,6 +46,7 @@ retraction_count_max = 25
|
||||||
retraction_extrusion_window = 1
|
retraction_extrusion_window = 1
|
||||||
retraction_hop = 2
|
retraction_hop = 2
|
||||||
retraction_hop_only_when_collides = True
|
retraction_hop_only_when_collides = True
|
||||||
|
retraction_min_travel = =line_width * 2
|
||||||
skin_overlap = 5
|
skin_overlap = 5
|
||||||
speed_equalize_flow_enabled = True
|
speed_equalize_flow_enabled = True
|
||||||
speed_layer_0 = 20
|
speed_layer_0 = 20
|
||||||
|
|
|
@ -57,7 +57,7 @@ retraction_count_max = 15
|
||||||
retraction_extrusion_window = =retraction_amount
|
retraction_extrusion_window = =retraction_amount
|
||||||
retraction_hop = 2
|
retraction_hop = 2
|
||||||
retraction_hop_only_when_collides = True
|
retraction_hop_only_when_collides = True
|
||||||
retraction_min_travel = 5
|
retraction_min_travel = =line_width * 3
|
||||||
retraction_prime_speed = 15
|
retraction_prime_speed = 15
|
||||||
skin_overlap = 5
|
skin_overlap = 5
|
||||||
speed_layer_0 = 20
|
speed_layer_0 = 20
|
||||||
|
|
|
@ -46,6 +46,7 @@ retraction_count_max = 25
|
||||||
retraction_extrusion_window = 1
|
retraction_extrusion_window = 1
|
||||||
retraction_hop = 2
|
retraction_hop = 2
|
||||||
retraction_hop_only_when_collides = True
|
retraction_hop_only_when_collides = True
|
||||||
|
retraction_min_travel = =line_width * 2
|
||||||
skin_overlap = 5
|
skin_overlap = 5
|
||||||
speed_equalize_flow_enabled = True
|
speed_equalize_flow_enabled = True
|
||||||
speed_layer_0 = 20
|
speed_layer_0 = 20
|
||||||
|
|
|
@ -57,7 +57,7 @@ retraction_count_max = 15
|
||||||
retraction_extrusion_window = =retraction_amount
|
retraction_extrusion_window = =retraction_amount
|
||||||
retraction_hop = 2
|
retraction_hop = 2
|
||||||
retraction_hop_only_when_collides = True
|
retraction_hop_only_when_collides = True
|
||||||
retraction_min_travel = 5
|
retraction_min_travel = =line_width * 3
|
||||||
retraction_prime_speed = 15
|
retraction_prime_speed = 15
|
||||||
skin_overlap = 5
|
skin_overlap = 5
|
||||||
speed_layer_0 = 20
|
speed_layer_0 = 20
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue