From 48bac1a0f70ed9e20a52131083205e2574d0f0d2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 11 Jun 2018 14:45:43 +0200 Subject: [PATCH] Do not move locked nodes CURA-5347 --- cura/PlatformPhysics.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 6b539a4574..8ddcdbfb2f 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -8,6 +8,7 @@ from UM.Scene.SceneNode import SceneNode from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator from UM.Math.Vector import Vector from UM.Scene.Selection import Selection +from UM.Scene.SceneNodeSettings import SceneNodeSettings from cura.Scene.ConvexHullDecorator import ConvexHullDecorator @@ -80,6 +81,10 @@ class PlatformPhysics: # only push away objects if this node is a printing mesh if not node.callDecoration("isNonPrintingMesh") and Application.getInstance().getPreferences().getValue("physics/automatic_push_free"): + # Do not move locked nodes + if node.getSetting(SceneNodeSettings.LockPosition): + continue + # Check for collisions between convex hulls for other_node in BreadthFirstIterator(root): # Ignore root, ourselves and anything that is not a normal SceneNode.