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:
authorfieldOfView <aldo@fieldofview.com>2016-01-28 14:23:24 +0300
committerfieldOfView <aldo@fieldofview.com>2016-02-08 11:20:46 +0300
commit6e11c2409bee1ef31ac8e04885be5b6f8d3924c7 (patch)
tree378116456f43e500367bdb825ba70982af772a64
parent828752af30b9b06a93b2d80eac11d8db8389d92a (diff)
Use working profile instead of "active" profile
-rw-r--r--cura/BuildVolume.py4
-rw-r--r--cura/ConvexHullDecorator.py2
-rw-r--r--cura/ConvexHullJob.py2
-rw-r--r--cura/CuraApplication.py8
-rw-r--r--cura/OneAtATimeIterator.py2
-rw-r--r--cura/PrintInformation.py2
-rw-r--r--plugins/AutoSave/AutoSave.py2
-rw-r--r--plugins/CuraEngineBackend/CuraEngineBackend.py2
-rw-r--r--plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py2
-rw-r--r--plugins/GCodeWriter/GCodeWriter.py2
-rw-r--r--plugins/SliceInfoPlugin/SliceInfo.py2
-rw-r--r--plugins/SolidView/SolidView.py4
12 files changed, 17 insertions, 17 deletions
diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py
index c7d5962c77..e9b90e3a61 100644
--- a/cura/BuildVolume.py
+++ b/cura/BuildVolume.py
@@ -146,7 +146,7 @@ class BuildVolume(SceneNode):
skirt_size = 0.0
- profile = Application.getInstance().getMachineManager().getActiveProfile()
+ profile = Application.getInstance().getMachineManager().getWorkingProfile()
if profile:
skirt_size = self._getSkirtSize(profile)
@@ -176,7 +176,7 @@ class BuildVolume(SceneNode):
if self._active_profile:
self._active_profile.settingValueChanged.disconnect(self._onSettingValueChanged)
- self._active_profile = Application.getInstance().getMachineManager().getActiveProfile()
+ self._active_profile = Application.getInstance().getMachineManager().getWorkingProfile()
if self._active_profile:
self._active_profile.settingValueChanged.connect(self._onSettingValueChanged)
self._updateDisallowedAreas()
diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py
index 23e4a4fe95..f791441f1e 100644
--- a/cura/ConvexHullDecorator.py
+++ b/cura/ConvexHullDecorator.py
@@ -63,7 +63,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
if self._profile:
self._profile.settingValueChanged.disconnect(self._onSettingValueChanged)
- self._profile = Application.getInstance().getMachineManager().getActiveProfile()
+ self._profile = Application.getInstance().getMachineManager().getWorkingProfile()
if self._profile:
self._profile.settingValueChanged.connect(self._onSettingValueChanged)
diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py
index 0f69afcaec..fe9a6c279f 100644
--- a/cura/ConvexHullJob.py
+++ b/cura/ConvexHullJob.py
@@ -49,7 +49,7 @@ class ConvexHullJob(Job):
# This is done because of rounding errors.
hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
- profile = Application.getInstance().getMachineManager().getActiveProfile()
+ profile = Application.getInstance().getMachineManager().getWorkingProfile()
if profile:
if profile.getSettingValue("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
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py
index a496dbac47..996e621c7a 100644
--- a/cura/CuraApplication.py
+++ b/cura/CuraApplication.py
@@ -502,18 +502,18 @@ class CuraApplication(QtApplication):
@pyqtSlot(str, result = "QVariant")
def getSettingValue(self, key):
- if not self.getMachineManager().getActiveProfile():
+ if not self.getMachineManager().getWorkingProfile():
return None
- return self.getMachineManager().getActiveProfile().getSettingValue(key)
+ return self.getMachineManager().getWorkingProfile().getSettingValue(key)
#return self.getActiveMachine().getSettingValueByKey(key)
## Change setting by key value pair
@pyqtSlot(str, "QVariant")
def setSettingValue(self, key, value):
- if not self.getMachineManager().getActiveProfile():
+ if not self.getMachineManager().getWorkingProfile():
return
- self.getMachineManager().getActiveProfile().setSettingValue(key, value)
+ self.getMachineManager().getWorkingProfile().setSettingValue(key, value)
@pyqtSlot()
def mergeSelected(self):
diff --git a/cura/OneAtATimeIterator.py b/cura/OneAtATimeIterator.py
index 449ca87c31..42ec14e6ff 100644
--- a/cura/OneAtATimeIterator.py
+++ b/cura/OneAtATimeIterator.py
@@ -21,7 +21,7 @@ class OneAtATimeIterator(Iterator.Iterator):
if not type(node) is SceneNode:
continue
- if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("gantry_height"):
+ if node.getBoundingBox().height > Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height"):
return
if node.callDecoration("getConvexHull"):
node_list.append(node)
diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py
index 55507fd603..3c404e69a3 100644
--- a/cura/PrintInformation.py
+++ b/cura/PrintInformation.py
@@ -66,6 +66,6 @@ class PrintInformation(QObject):
self.currentPrintTimeChanged.emit()
# Material amount is sent as an amount of mm^3, so calculate length from that
- r = Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("material_diameter") / 2
+ r = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("material_diameter") / 2
self._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2)
self.materialAmountChanged.emit()
diff --git a/plugins/AutoSave/AutoSave.py b/plugins/AutoSave/AutoSave.py
index b0067513a0..a631628bba 100644
--- a/plugins/AutoSave/AutoSave.py
+++ b/plugins/AutoSave/AutoSave.py
@@ -47,7 +47,7 @@ class AutoSave(Extension):
if self._profile:
self._profile.settingValueChanged.disconnect(self._onSettingValueChanged)
- self._profile = Application.getInstance().getMachineManager().getActiveProfile()
+ self._profile = Application.getInstance().getMachineManager().getWorkingProfile()
if self._profile:
self._profile.settingValueChanged.connect(self._onSettingValueChanged)
diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py
index c005d8da05..47904fd5fe 100644
--- a/plugins/CuraEngineBackend/CuraEngineBackend.py
+++ b/plugins/CuraEngineBackend/CuraEngineBackend.py
@@ -180,7 +180,7 @@ class CuraEngineBackend(Backend):
if self._profile:
self._profile.settingValueChanged.disconnect(self._onSettingChanged)
- self._profile = Application.getInstance().getMachineManager().getActiveProfile()
+ self._profile = Application.getInstance().getMachineManager().getWorkingProfile()
if self._profile:
self._profile.settingValueChanged.connect(self._onSettingChanged)
self._onChanged()
diff --git a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py
index 3c0b23c595..acd974797c 100644
--- a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py
+++ b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py
@@ -44,7 +44,7 @@ class ProcessSlicedObjectListJob(Job):
object_id_map[id(node)] = node
Job.yieldThread()
- settings = Application.getInstance().getMachineManager().getActiveProfile()
+ settings = Application.getInstance().getMachineManager().getWorkingProfile()
center = None
if not settings.getSettingValue("machine_center_is_zero"):
diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py
index 3bb986d1bd..28677074cf 100644
--- a/plugins/GCodeWriter/GCodeWriter.py
+++ b/plugins/GCodeWriter/GCodeWriter.py
@@ -40,7 +40,7 @@ class GCodeWriter(MeshWriter):
if gcode_list:
for gcode in gcode_list:
stream.write(gcode)
- profile = self._serialiseProfile(Application.getInstance().getMachineManager().getActiveProfile()) #Serialise the profile and put them at the end of the file.
+ profile = self._serialiseProfile(Application.getInstance().getMachineManager().getWorkingProfile()) #Serialise the profile and put them at the end of the file.
stream.write(profile)
return True
diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py
index 20ba21f991..78d0c7cec0 100644
--- a/plugins/SliceInfoPlugin/SliceInfo.py
+++ b/plugins/SliceInfoPlugin/SliceInfo.py
@@ -44,7 +44,7 @@ class SliceInfo(Extension):
def _onWriteStarted(self, output_device):
if not Preferences.getInstance().getValue("info/send_slice_info"):
return # Do nothing, user does not want to send data
- settings = Application.getInstance().getMachineManager().getActiveProfile()
+ settings = Application.getInstance().getMachineManager().getWorkingProfile()
# Load all machine definitions and put them in machine_settings dict
#setting_file_name = Application.getInstance().getActiveMachineInstance().getMachineSettings()._json_file
diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py
index 988fe20120..beb2780d14 100644
--- a/plugins/SolidView/SolidView.py
+++ b/plugins/SolidView/SolidView.py
@@ -34,8 +34,8 @@ class SolidView(View):
self._disabled_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "overhang.shader"))
self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0])
- if Application.getInstance().getMachineManager().getActiveProfile():
- profile = Application.getInstance().getMachineManager().getActiveProfile()
+ if Application.getInstance().getMachineManager().getWorkingProfile():
+ profile = Application.getInstance().getMachineManager().getWorkingProfile()
if profile.getSettingValue("support_enable") or not Preferences.getInstance().getValue("view/show_overhang"):
angle = profile.getSettingValue("support_angle")