mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
added drop models to buildplate as a right click option
Also shortcut: ctrl+B CURA-10542
This commit is contained in:
parent
86bf94cc31
commit
1338a562ef
8 changed files with 18 additions and 43 deletions
|
@ -1085,9 +1085,9 @@ class CuraApplication(QtApplication):
|
|||
def getTextManager(self, *args) -> "TextManager":
|
||||
return self._text_manager
|
||||
|
||||
@pyqtSlot(bool)
|
||||
def getWorkplaceDropToBuildplate(self, drop_to_build_plate: bool) ->None:
|
||||
return self._physics.setAppPerModelDropDown(drop_to_build_plate)
|
||||
@pyqtSlot()
|
||||
def setWorkplaceDropToBuildplate(self):
|
||||
return self._physics.setAppPerModelDropDown()
|
||||
|
||||
def getCuraFormulaFunctions(self, *args) -> "CuraFormulaFunctions":
|
||||
if self._cura_formula_functions is None:
|
||||
|
|
|
@ -41,11 +41,9 @@ class PlatformPhysics:
|
|||
Application.getInstance().getPreferences().addPreference("physics/automatic_drop_down", True)
|
||||
self._app_per_model_drop = None
|
||||
|
||||
def getAppPerModelDropDown(self):
|
||||
return self._app_per_model_drop
|
||||
|
||||
def setAppPerModelDropDown(self, drop_to_buildplate):
|
||||
self._app_per_model_drop = drop_to_buildplate
|
||||
def setAppPerModelDropDown(self):
|
||||
self._app_per_model_drop = True
|
||||
self._onChangeTimerFinished()
|
||||
|
||||
def _onSceneChanged(self, source):
|
||||
if not source.callDecoration("isSliceable"):
|
||||
|
@ -79,13 +77,7 @@ class PlatformPhysics:
|
|||
# By shuffling the order of the nodes, this might happen a few times, but at some point it will resolve.
|
||||
random.shuffle(nodes)
|
||||
drop_down = False
|
||||
# drop down in case nodes are asked to drop down from the user from workspaceDialog while opening 3mf
|
||||
if self._app_per_model_drop and (self._app_per_model_drop != app_automatic_drop_down):
|
||||
drop_down = True
|
||||
# drop down in case the user has selected automated drop down preference for 3mf opening
|
||||
if self._app_per_model_drop and app_automatic_drop_down:
|
||||
drop_down= True
|
||||
|
||||
if self._app_per_model_drop == True: drop_down = True
|
||||
|
||||
for node in nodes:
|
||||
if node is root or not isinstance(node, SceneNode) or node.getBoundingBox() is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue