Browse Source

Fix convex hull and other bits so they use the new API

Arjen Hiemstra 9 years ago
parent
commit
792c3426f8
3 changed files with 4 additions and 4 deletions
  1. 1 1
      cura/ConvexHullJob.py
  2. 1 1
      cura/ConvexHullNode.py
  3. 2 2
      cura/OneAtATimeIterator.py

+ 1 - 1
cura/ConvexHullJob.py

@@ -45,7 +45,7 @@ class ConvexHullJob(Job):
         # Then, do a Minkowski hull with a simple 1x1 quad to outset and round the normal convex hull.
         # Then, do a Minkowski hull with a simple 1x1 quad to outset and round the normal convex hull.
         # This is done because of rounding errors.
         # This is done because of rounding errors.
         hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
         hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
-        settings = Application.getInstance().getActiveMachine()
+        settings = Application.getInstance().getMachineManager().getActiveMachineInstance()
         
         
         if settings.getSettingValueByKey("print_sequence") == "One at a time" and not self._node.getParent().callDecoration("isGroup"):
         if settings.getSettingValueByKey("print_sequence") == "One at a time" and not self._node.getParent().callDecoration("isGroup"):
             # Printing one at a time and it's not an object in a group
             # Printing one at a time and it's not an object in a group

+ 1 - 1
cura/ConvexHullNode.py

@@ -53,7 +53,7 @@ class ConvexHullNode(SceneNode):
 
 
     def render(self, renderer):
     def render(self, renderer):
         if not self._material:
         if not self._material:
-            self._material = renderer.createMaterial(Resources.getPath(Resources.ShadersLocation, "basic.vert"), Resources.getPath(Resources.ShadersLocation, "color.frag"))
+            self._material = renderer.createMaterial(Resources.getPath(Resources.Shaders, "basic.vert"), Resources.getPath(Resources.Shaders, "color.frag"))
 
 
             self._material.setUniformValue("u_color", Color(35, 35, 35, 128))
             self._material.setUniformValue("u_color", Color(35, 35, 35, 128))
         if self.getParent():
         if self.getParent():

+ 2 - 2
cura/OneAtATimeIterator.py

@@ -17,7 +17,7 @@ class OneAtATimeIterator(Iterator.Iterator):
     def _fillStack(self):
     def _fillStack(self):
         node_list = []
         node_list = []
         for node in self._scene_node.getChildren():
         for node in self._scene_node.getChildren():
-            if node.getBoundingBox().height > Application.getInstance().getActiveMachine().getSettingValueByKey("gantry_height"):
+            if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveMachineInstance().getSettingValueByKey("gantry_height"):
                 return
                 return
             if node.callDecoration("getConvexHull"):
             if node.callDecoration("getConvexHull"):
                 node_list.append(node)
                 node_list.append(node)
@@ -103,4 +103,4 @@ class _objectOrder():
         """
         """
         self.order = order
         self.order = order
         self.todo = todo
         self.todo = todo
-        
+