prefDialog.Show()
def OnDropFiles(self, files):
- profile.setPluginConfig([])
- self.updateProfileToControls()
+ if len(files) > 0:
+ profile.setPluginConfig([])
+ self.updateProfileToControls()
self.scene.loadScene(files)
def OnModelMRU(self, e):
def updateProfileToControls(self):
self.pluginConfig = profile.getPluginConfig()
+ print 'pluginPanel::updateProfileToControls', self.pluginConfig
for p in self.panelList:
p.Show(False)
self.pluginEnabledPanel.GetSizer().Detach(p)
return True
def OnSettingChange(self, e):
+ print 'pluginPanel::OnSettingChange'
for panel in self.panelList:
idx = self.panelList.index(panel)
for k in panel.paramCtrls.keys():
with open(filename, "r") as f:
lines = f.readlines()
-z = 0
-x = 0
-y = 0
+z = 0.
+x = 0.
+y = 0.
pauseState = 0
+currentSectionType = 'CUSTOM'
with open(filename, "w") as f:
for line in lines:
if line.startswith(';'):
currentSectionType = line[6:].strip()
f.write(line)
continue
- if getValue(line, 'G', None) == 1:
+ if getValue(line, 'G', None) == 1 or getValue(line, 'G', None) == 0:
newZ = getValue(line, 'Z', z)
x = getValue(line, 'X', x)
y = getValue(line, 'Y', y)
def getPluginConfig():
try:
- return pickle.loads(getProfileSetting('plugin_config'))
+ return pickle.loads(str(getProfileSetting('plugin_config')))
except:
return []
def setPluginConfig(config):
putProfileSetting('plugin_config', pickle.dumps(config))
+ print 'setPluginConfig:', config
+ locationInfo = traceback.extract_tb(sys.exc_info()[2])[-1]
+ print "%s: '%s' @ %s:%s:%d" % (str(sys.exc_info()[0].__name__), str(sys.exc_info()[1]), os.path.basename(locationInfo[0]), locationInfo[2], locationInfo[1])
def getPluginBasePaths():
ret = []
def runPostProcessingPlugins(gcodefilename):
pluginConfigList = getPluginConfig()
pluginList = getPluginList()
-
+
for pluginConfig in pluginConfigList:
plugin = None
for pluginTest in pluginList:
returnCode = self._process.wait()
try:
if returnCode == 0:
- profile.runPostProcessingPlugins(self._exportFilename)
+ print profile.runPostProcessingPlugins(self._exportFilename)
self._callback(1.0, True)
else:
for line in self._sliceLog:
return WARNING, 'Trying to print walls thinner then the 0.8 * nozzle size. Small chance that this will produce usable results'
if wallThickness < nozzleSize:
return SUCCESS, ''
+ if nozzleSize <= 0:
+ return ERROR, 'Incorrect nozzle size'
lineCount = int(wallThickness / nozzleSize)
lineWidth = wallThickness / lineCount