mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
parent
04999a42c8
commit
bbf0b92f87
3 changed files with 142 additions and 1 deletions
|
@ -12,6 +12,8 @@ from UM.Math.Vector import Vector
|
|||
from UM.Math.AxisAlignedBox import AxisAlignedBox
|
||||
from UM.Application import Application
|
||||
from UM.Scene.Selection import Selection
|
||||
from UM.Preferences import Preferences
|
||||
|
||||
from cura.ConvexHullDecorator import ConvexHullDecorator
|
||||
|
||||
from . import PlatformPhysicsOperation
|
||||
|
@ -37,6 +39,8 @@ class PlatformPhysics:
|
|||
self._change_timer.setSingleShot(True)
|
||||
self._change_timer.timeout.connect(self._onChangeTimerFinished)
|
||||
|
||||
Preferences.getInstance().addPreference("physics/automatic_push_free", True)
|
||||
|
||||
def _onSceneChanged(self, source):
|
||||
self._change_timer.start()
|
||||
|
||||
|
@ -82,7 +86,7 @@ class PlatformPhysics:
|
|||
|
||||
elif Selection.isSelected(node):
|
||||
pass
|
||||
else:
|
||||
elif Preferences.getInstance().getValue("physics/automatic_push_free"):
|
||||
# Check for collisions between convex hulls
|
||||
for other_node in BreadthFirstIterator(root):
|
||||
# Ignore root, ourselves and anything that is not a normal SceneNode.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue