Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfieldOfView <aldo@fieldofview.com>2018-03-23 11:46:05 +0300
committerLipu Fei <lipu.fei815@gmail.com>2018-04-19 09:32:50 +0300
commit57404deba695c0e35595eb8c1f2797f6a7197cd7 (patch)
tree437d236e08bc9575c5a07a5a751d2ada54661b0d /plugins/SupportEraser
parenta52eaa98f1509d7e290a31e7b2d8f0365d905264 (diff)
Prevent scaling support eraser with scaled parent
Diffstat (limited to 'plugins/SupportEraser')
-rw-r--r--plugins/SupportEraser/SupportEraser.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/SupportEraser/SupportEraser.py b/plugins/SupportEraser/SupportEraser.py
index f1306df04c..06d9fc3707 100644
--- a/plugins/SupportEraser/SupportEraser.py
+++ b/plugins/SupportEraser/SupportEraser.py
@@ -19,8 +19,10 @@ from cura.Scene.CuraSceneNode import CuraSceneNode
from cura.PickingPass import PickingPass
+from UM.Operations.GroupedOperation import GroupedOperation
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation
+from cura.Operations.SetParentOperation import SetParentOperation
from cura.Scene.SliceableObjectDecorator import SliceableObjectDecorator
from cura.Scene.BuildPlateDecorator import BuildPlateDecorator
@@ -117,7 +119,10 @@ class SupportEraser(Tool):
new_instance.resetState() # Ensure that the state is not seen as a user state.
settings.addInstance(new_instance)
- op = AddSceneNodeOperation(node, parent)
+ op = GroupedOperation()
+ # First add node to the scene at the correct position/scale, before parenting, so the eraser mesh does not get scaled with the parent
+ op.addOperation(AddSceneNodeOperation(node, self._controller.getScene().getRoot()))
+ op.addOperation(SetParentOperation(node, parent))
op.push()
node.setPosition(position, CuraSceneNode.TransformSpace.World)