diff options
author | Ian Paschal <ian.paschal@gmail.com> | 2018-07-05 16:20:38 +0300 |
---|---|---|
committer | Ian Paschal <ian.paschal@gmail.com> | 2018-07-05 16:20:38 +0300 |
commit | 07e92ead0b6100a4fd518fd4008536f0774ebb0a (patch) | |
tree | 6a241b80115d204adc30f461df94e5706c25a762 /plugins/CuraEngineBackend | |
parent | 6f20b9219d76648903aa8028c4e2ae85d346ebfb (diff) |
last fixes for CuraEngineBackend
Diffstat (limited to 'plugins/CuraEngineBackend')
-rwxr-xr-x | plugins/CuraEngineBackend/CuraEngineBackend.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 4fc1381d2a..26a2399567 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -21,6 +21,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Settings.Interfaces import DefinitionContainerInterface from UM.Settings.SettingInstance import SettingInstance #For typing. from UM.Tool import Tool #For typing. +from UM.Mesh.MeshData import MeshData #For typing. from cura.CuraApplication import CuraApplication from cura.Settings.ExtruderManager import ExtruderManager @@ -62,7 +63,7 @@ class CuraEngineBackend(QObject, Backend): if Platform.isLinux() and not default_engine_location: if not os.getenv("PATH"): raise OSError("There is something wrong with your Linux installation.") - for pathdir in os.getenv("PATH").split(os.pathsep): + for pathdir in cast(str, os.getenv("PATH")).split(os.pathsep): execpath = os.path.join(pathdir, executable_name) if os.path.exists(execpath): default_engine_location = execpath @@ -485,9 +486,8 @@ class CuraEngineBackend(QObject, Backend): else: # we got a single scenenode if not source.callDecoration("isGroup"): - if source.getMeshData() is None: - return - if source.getMeshData().getVertices() is None: + meshData = source.getMeshData(); + if meshData and meshData.getVertices() is None: return build_plate_changed.add(source_build_plate_number) @@ -670,7 +670,7 @@ class CuraEngineBackend(QObject, Backend): ## Creates a new socket connection. def _createSocket(self, protocol_file: str = None) -> None: if not protocol_file: - protocol_file = os.path.abspath(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "Cura.proto")) + protocol_file = os.path.abspath(os.path.join(str(PluginRegistry.getInstance().getPluginPath(self.getPluginId())), "Cura.proto")) super()._createSocket(protocol_file) self._engine_is_fresh = True |