mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:25:56 +08:00
Prevent scaling support eraser with scaled parent
This commit is contained in:
parent
47417c86a3
commit
3078ac2d2d
@ -19,8 +19,10 @@ from cura.Scene.CuraSceneNode import CuraSceneNode
|
|||||||
|
|
||||||
from cura.PickingPass import PickingPass
|
from cura.PickingPass import PickingPass
|
||||||
|
|
||||||
|
from UM.Operations.GroupedOperation import GroupedOperation
|
||||||
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
|
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
|
||||||
from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation
|
from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation
|
||||||
|
from cura.Operations.SetParentOperation import SetParentOperation
|
||||||
|
|
||||||
from cura.Scene.SliceableObjectDecorator import SliceableObjectDecorator
|
from cura.Scene.SliceableObjectDecorator import SliceableObjectDecorator
|
||||||
from cura.Scene.BuildPlateDecorator import BuildPlateDecorator
|
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.
|
new_instance.resetState() # Ensure that the state is not seen as a user state.
|
||||||
settings.addInstance(new_instance)
|
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()
|
op.push()
|
||||||
node.setPosition(position, CuraSceneNode.TransformSpace.World)
|
node.setPosition(position, CuraSceneNode.TransformSpace.World)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user