chiark / gitweb /
Add a overridePostProcessPluginConfig API
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 13 Jan 2015 22:47:44 +0000 (17:47 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 13 Jan 2015 22:47:47 +0000 (17:47 -0500)
This is to allow temporary override of plugin configurations for simple
mode settings for example.
To use it, just call overridePostProcessPluginConfig(config) and provide
a configuration list for the plugins (print the one given to the
setPostProcessPluginconfig function and reuse it in your simple config)
This should put us one step forward with regards to issue #59

Cura/util/pluginInfo.py

index 54fe725287de4bc6ff29610699e236a0cf34760a..5f80a5f1a3166eef2087ee92cbe0fbcf14c274af 100644 (file)
@@ -79,6 +79,9 @@ def getPostProcessPluginConfig():
 def setPostProcessPluginConfig(config):
        profile.putProfileSetting('plugin_config', pickle.dumps(config))
 
+def overridePostProcessPluginConfig(config):
+       profile.setTempOverride('plugin_config', pickle.dumps(config))
+
 def getPluginBasePaths():
        ret = []
        if platform.system() != "Windows":