Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2019-11-20 18:48:00 +0300
committerJaime van Kessel <nallath@gmail.com>2019-11-20 18:48:00 +0300
commit50d72692d8163d3e0cd5c577246a2eb024273dc6 (patch)
tree3e1e6ed85c8753f43a35e0fdc087f05c83b7df7a /cura/Scene
parent266f7d1f74c860eb80433ea248cc6da1d864c190 (diff)
parent9aeb9912c8d0d37db11bb11372c982d065b56c16 (diff)
Merge branch 'master' of github.com:Ultimaker/Cura into CURA-6522_one_at_a_time_overlapping_build_area
Diffstat (limited to 'cura/Scene')
-rw-r--r--cura/Scene/BuildPlateDecorator.py8
-rw-r--r--cura/Scene/ConvexHullNode.py7
2 files changed, 9 insertions, 6 deletions
diff --git a/cura/Scene/BuildPlateDecorator.py b/cura/Scene/BuildPlateDecorator.py
index dfb465b7ad..cff9f88f62 100644
--- a/cura/Scene/BuildPlateDecorator.py
+++ b/cura/Scene/BuildPlateDecorator.py
@@ -4,12 +4,12 @@ from cura.Scene.CuraSceneNode import CuraSceneNode
## Make a SceneNode build plate aware CuraSceneNode objects all have this decorator.
class BuildPlateDecorator(SceneNodeDecorator):
- def __init__(self, build_plate_number = -1):
+ def __init__(self, build_plate_number: int = -1) -> None:
super().__init__()
- self._build_plate_number = None
+ self._build_plate_number = build_plate_number
self.setBuildPlateNumber(build_plate_number)
- def setBuildPlateNumber(self, nr):
+ def setBuildPlateNumber(self, nr: int) -> None:
# Make sure that groups are set correctly
# setBuildPlateForSelection in CuraActions makes sure that no single childs are set.
self._build_plate_number = nr
@@ -19,7 +19,7 @@ class BuildPlateDecorator(SceneNodeDecorator):
for child in self._node.getChildren():
child.callDecoration("setBuildPlateNumber", nr)
- def getBuildPlateNumber(self):
+ def getBuildPlateNumber(self) -> int:
return self._build_plate_number
def __deepcopy__(self, memo):
diff --git a/cura/Scene/ConvexHullNode.py b/cura/Scene/ConvexHullNode.py
index 6aa71223e5..da2713a522 100644
--- a/cura/Scene/ConvexHullNode.py
+++ b/cura/Scene/ConvexHullNode.py
@@ -1,6 +1,6 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
-from typing import Optional
+from typing import Optional, TYPE_CHECKING
from UM.Application import Application
from UM.Math.Polygon import Polygon
@@ -11,6 +11,9 @@ from UM.Math.Color import Color
from UM.Mesh.MeshBuilder import MeshBuilder # To create a mesh to display the convex hull with.
from UM.View.GL.OpenGL import OpenGL
+if TYPE_CHECKING:
+ from UM.Mesh.MeshData import MeshData
+
class ConvexHullNode(SceneNode):
shader = None # To prevent the shader from being re-built over and over again, only load it once.
@@ -44,7 +47,7 @@ class ConvexHullNode(SceneNode):
# The node this mesh is "watching"
self._node = node
# Area of the head + fans for display as a shadow on the buildplate
- self._convex_hull_head_mesh = None
+ self._convex_hull_head_mesh = None # type: Optional[MeshData]
self._node.decoratorsChanged.connect(self._onNodeDecoratorsChanged)
self._onNodeDecoratorsChanged(self._node)