diff options
author | Maël Kerbiriou <m431.kerbiriou@gmail.com> | 2022-09-06 18:59:54 +0300 |
---|---|---|
committer | Maël Kerbiriou <m431.kerbiriou@gmail.com> | 2022-09-06 19:06:31 +0300 |
commit | 4b7f18c08ce985581800fa0152ce8f93eb745cb3 (patch) | |
tree | 6a81f8b8c8235044f63ba1d5a35ad7a1dbc1e5d6 /cura/PlatformPhysics.py | |
parent | 111136cf493c7d2a567d68bfb9ceffe90f340453 (diff) |
SceneNode settings use native python types
Diffstat (limited to 'cura/PlatformPhysics.py')
-rwxr-xr-x | cura/PlatformPhysics.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index ebf885d609..402b9fe250 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -10,7 +10,6 @@ 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 UM.Util import parseBool from cura.Scene.ConvexHullDecorator import ConvexHullDecorator @@ -53,7 +52,7 @@ class PlatformPhysics: app_instance = Application.getInstance() app_preferences = app_instance.getPreferences() - app_automatic_drop_down = str(app_preferences.getValue("physics/automatic_drop_down")) + app_automatic_drop_down = app_preferences.getValue("physics/automatic_drop_down") app_automatic_push_free = app_preferences.getValue("physics/automatic_push_free") root = self._controller.getScene().getRoot() @@ -81,7 +80,7 @@ class PlatformPhysics: # Move it downwards if bottom is above platform move_vector = Vector() - if parseBool(node.getSetting(SceneNodeSettings.AutoDropDown, app_automatic_drop_down)) and not (node.getParent() and node.getParent().callDecoration("isGroup") or node.getParent() != root) and node.isEnabled(): #If an object is grouped, don't move it down + if node.getSetting(SceneNodeSettings.AutoDropDown, app_automatic_drop_down) and not (node.getParent() and node.getParent().callDecoration("isGroup") or node.getParent() != root) and node.isEnabled(): #If an object is grouped, don't move it down z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0 move_vector = move_vector.set(y = -bbox.bottom + z_offset) |