mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
CURA-4525 updated scene node menu and added multi buildplate arrange
This commit is contained in:
parent
38670171f5
commit
41d5ec86a3
9 changed files with 272 additions and 44 deletions
|
@ -1,14 +1,20 @@
|
|||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||
from UM.Scene.Selection import Selection
|
||||
from UM.Application import Application
|
||||
from UM.Logger import Logger
|
||||
|
||||
|
||||
class BuildPlateDecorator(SceneNodeDecorator):
|
||||
def __init__(self):
|
||||
def __init__(self, build_plate_number = -1):
|
||||
super().__init__()
|
||||
self._build_plate_number = -1
|
||||
self.setBuildPlateNumber(build_plate_number)
|
||||
|
||||
def setBuildPlateNumber(self, nr):
|
||||
# Make sure that groups are set correctly
|
||||
# setBuildPlateForSelection in CuraActions makes sure that no single childs are set.
|
||||
self._build_plate_number = nr
|
||||
if self._node and self._node.callDecoration("isGroup"):
|
||||
for child in self._node.getChildren():
|
||||
child.callDecoration("setBuildPlateNumber", nr)
|
||||
|
||||
def getBuildPlateNumber(self):
|
||||
return self._build_plate_number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue