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:
Diffstat (limited to 'Cura/util/profile.py')
-rw-r--r--Cura/util/profile.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Cura/util/profile.py b/Cura/util/profile.py
index 823fe3e95c..023fae49d8 100644
--- a/Cura/util/profile.py
+++ b/Cura/util/profile.py
@@ -284,6 +284,24 @@ def getGlobalProfileString():
ret = base64.b64encode(zlib.compress(ret, 9))
return ret
+def getGlobalPreferencesString():
+ global globalPreferenceParser
+ if globalPreferenceParser is None:
+ globalPreferenceParser = ConfigParser.ConfigParser()
+ try:
+ globalPreferenceParser.read(getPreferencePath())
+ except ConfigParser.ParsingError:
+ pass
+
+ p = []
+ if globalPreferenceParser.has_section('preference'):
+ for key in globalPreferenceParser.options('preference'):
+ p.append(key + "=" + globalPreferenceParser.get('preference', key))
+ ret = '\b'.join(p)
+ ret = base64.b64encode(zlib.compress(ret, 9))
+ return ret
+
+
def getProfileSetting(name):
if name in tempOverride:
return unicode(tempOverride[name], "utf-8")