mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Revert "Ignore per-meshgroup settings in per object stack"
CURA-5767
This reverts commit 54afa799c5
.
This commit is contained in:
parent
54afa799c5
commit
39158a643c
2 changed files with 2 additions and 18 deletions
|
@ -5,7 +5,6 @@ from typing import Any, Optional
|
|||
|
||||
from UM.Application import Application
|
||||
from UM.Decorators import override
|
||||
from UM.Logger import Logger
|
||||
from UM.Settings.Interfaces import PropertyEvaluationContext
|
||||
from UM.Settings.SettingInstance import InstanceState
|
||||
|
||||
|
@ -58,22 +57,7 @@ class PerObjectContainerStack(CuraContainerStack):
|
|||
return result
|
||||
|
||||
@override(CuraContainerStack)
|
||||
def setProperty(self, key: str, property_name: str, property_value: Any, container: "ContainerInterface" = None, set_from_cache: bool = False) -> None:
|
||||
application = Application.getInstance()
|
||||
machine_manager = application.getMachineManager()
|
||||
global_stack = machine_manager.activeMachine
|
||||
|
||||
# Ignore all settable-per-meshgroup settings for now because the current CuraEngine architecture cannot handle
|
||||
# that correctly. This check is also here is because if an old project file includes per-object settings that
|
||||
# are settable-per-meshgroup, when it is loaded, we need to filter out those settings.
|
||||
if not global_stack.getProperty(key, "settable_per_mesh"):
|
||||
Logger.log("i", "Setting [%s] ignored as a per-object setting because it's not settable-per-mesh.", key)
|
||||
return
|
||||
super().setProperty(self, key, property_name, property_value,
|
||||
container = container, set_from_cache = set_from_cache)
|
||||
|
||||
@override(CuraContainerStack)
|
||||
def setNextStack(self, stack: "CuraContainerStack") -> None:
|
||||
def setNextStack(self, stack: CuraContainerStack) -> None:
|
||||
super().setNextStack(stack)
|
||||
|
||||
# trigger signal to re-evaluate all default settings
|
||||
|
|
|
@ -135,7 +135,7 @@ class ThreeMFReader(MeshReader):
|
|||
definition_id = getMachineDefinitionIDForQualitySearch(global_container_stack.definition)
|
||||
um_node.callDecoration("getStack").getTop().setDefinition(definition_id)
|
||||
|
||||
setting_container = um_node.callDecoration("getStack")
|
||||
setting_container = um_node.callDecoration("getStack").getTop()
|
||||
|
||||
for key in settings:
|
||||
setting_value = settings[key]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue