mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
function Name change
CURA-10542
This commit is contained in:
parent
1338a562ef
commit
5865906057
2 changed files with 6 additions and 9 deletions
|
@ -1087,7 +1087,7 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def setWorkplaceDropToBuildplate(self):
|
def setWorkplaceDropToBuildplate(self):
|
||||||
return self._physics.setAppPerModelDropDown()
|
return self._physics.setAppAllModelDropDown()
|
||||||
|
|
||||||
def getCuraFormulaFunctions(self, *args) -> "CuraFormulaFunctions":
|
def getCuraFormulaFunctions(self, *args) -> "CuraFormulaFunctions":
|
||||||
if self._cura_formula_functions is None:
|
if self._cura_formula_functions is None:
|
||||||
|
|
|
@ -39,10 +39,10 @@ class PlatformPhysics:
|
||||||
|
|
||||||
Application.getInstance().getPreferences().addPreference("physics/automatic_push_free", False)
|
Application.getInstance().getPreferences().addPreference("physics/automatic_push_free", False)
|
||||||
Application.getInstance().getPreferences().addPreference("physics/automatic_drop_down", True)
|
Application.getInstance().getPreferences().addPreference("physics/automatic_drop_down", True)
|
||||||
self._app_per_model_drop = None
|
self._app_all_model_drop = False
|
||||||
|
|
||||||
def setAppPerModelDropDown(self):
|
def setAppAllModelDropDown(self):
|
||||||
self._app_per_model_drop = True
|
self._app_all_model_drop = True
|
||||||
self._onChangeTimerFinished()
|
self._onChangeTimerFinished()
|
||||||
|
|
||||||
def _onSceneChanged(self, source):
|
def _onSceneChanged(self, source):
|
||||||
|
@ -76,9 +76,6 @@ class PlatformPhysics:
|
||||||
# We try to shuffle all the nodes to prevent "locked" situations, where iteration B inverts iteration A.
|
# We try to shuffle all the nodes to prevent "locked" situations, where iteration B inverts iteration A.
|
||||||
# By shuffling the order of the nodes, this might happen a few times, but at some point it will resolve.
|
# By shuffling the order of the nodes, this might happen a few times, but at some point it will resolve.
|
||||||
random.shuffle(nodes)
|
random.shuffle(nodes)
|
||||||
drop_down = False
|
|
||||||
if self._app_per_model_drop == True: drop_down = True
|
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node is root or not isinstance(node, SceneNode) or node.getBoundingBox() is None:
|
if node is root or not isinstance(node, SceneNode) or node.getBoundingBox() is None:
|
||||||
continue
|
continue
|
||||||
|
@ -88,7 +85,7 @@ class PlatformPhysics:
|
||||||
# Move it downwards if bottom is above platform
|
# Move it downwards if bottom is above platform
|
||||||
move_vector = Vector()
|
move_vector = Vector()
|
||||||
|
|
||||||
if (node.getSetting(SceneNodeSettings.AutoDropDown, app_automatic_drop_down) or drop_down) and not (node.getParent() and node.getParent().callDecoration("isGroup") or node.getParent() != root) and node.isEnabled():
|
if (node.getSetting(SceneNodeSettings.AutoDropDown, app_automatic_drop_down) or self._app_all_model_drop) and not (node.getParent() and node.getParent().callDecoration("isGroup") or node.getParent() != root) and node.isEnabled():
|
||||||
z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0
|
z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0
|
||||||
move_vector = move_vector.set(y=-bbox.bottom + z_offset)
|
move_vector = move_vector.set(y=-bbox.bottom + z_offset)
|
||||||
|
|
||||||
|
@ -177,7 +174,7 @@ class PlatformPhysics:
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
# setting this drop to model same as app_automatic_drop_down
|
# setting this drop to model same as app_automatic_drop_down
|
||||||
self._app_per_model_drop = None
|
self._app_all_model_drop = False
|
||||||
# After moving, we have to evaluate the boundary checks for nodes
|
# After moving, we have to evaluate the boundary checks for nodes
|
||||||
build_volume.updateNodeBoundaryCheck()
|
build_volume.updateNodeBoundaryCheck()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue