mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-27 12:51:07 -07:00
D6: Moved decorator to cura
This commit is contained in:
parent
3605403314
commit
620a3891da
5 changed files with 54 additions and 34 deletions
|
|
@ -28,6 +28,7 @@ from UM.Operations.GroupedOperation import GroupedOperation
|
|||
from UM.Operations.SetTransformOperation import SetTransformOperation
|
||||
from UM.Operations.TranslateOperation import TranslateOperation
|
||||
from cura.SetParentOperation import SetParentOperation
|
||||
from cura.SliceableObjectDecorator import SliceableObjectDecorator
|
||||
|
||||
from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
|
|
@ -1088,6 +1089,16 @@ class CuraApplication(QtApplication):
|
|||
extension = os.path.splitext(filename)[1]
|
||||
if extension.lower() in self._non_sliceable_extensions:
|
||||
self.changeLayerViewSignal.emit()
|
||||
sliceable_decorator = SliceableObjectDecorator()
|
||||
sliceable_decorator.setBlockSlicing(True)
|
||||
sliceable_decorator.setSliceable(False)
|
||||
node.addDecorator(sliceable_decorator)
|
||||
else:
|
||||
sliceable_decorator = SliceableObjectDecorator()
|
||||
sliceable_decorator.setBlockSlicing(False)
|
||||
sliceable_decorator.setSliceable(True)
|
||||
node.addDecorator(sliceable_decorator)
|
||||
|
||||
|
||||
scene = self.getController().getScene()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue