Some minor fixes.
This commit is contained in:
parent
1a1a35e483
commit
d2f7aa4199
4 changed files with 8 additions and 7 deletions
|
@ -514,9 +514,9 @@ class FileNameInput(StringSetting ):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
class HelpPage:
|
class HelpPage:
|
||||||
"A class to open a help page."
|
"A class to open a help page."
|
||||||
def getOpenFromAbsolute( self, hypertextAddress ):
|
def getOpenFromAbsolute( self, hypertextAddress ):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
class MenuButtonDisplay:
|
class MenuButtonDisplay:
|
||||||
"A class to add a combo box selection."
|
"A class to add a combo box selection."
|
||||||
|
|
|
@ -242,7 +242,7 @@ class DimensionSkein:
|
||||||
line = extra + line
|
line = extra + line
|
||||||
self.oldLocation = location
|
self.oldLocation = location
|
||||||
else:
|
else:
|
||||||
if self.oldLocation == None:
|
if self.oldLocation is None:
|
||||||
print('Warning: There was no absolute location when the G91 command was parsed, so the absolute location will be set to the origin.')
|
print('Warning: There was no absolute location when the G91 command was parsed, so the absolute location will be set to the origin.')
|
||||||
self.oldLocation = Vector3()
|
self.oldLocation = Vector3()
|
||||||
location = gcodec.getLocationFromSplitLine(None, splitLine)
|
location = gcodec.getLocationFromSplitLine(None, splitLine)
|
||||||
|
|
|
@ -468,6 +468,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
|
||||||
self.oldY = 0
|
self.oldY = 0
|
||||||
self.dragType = ''
|
self.dragType = ''
|
||||||
self.tempRotate = 0
|
self.tempRotate = 0
|
||||||
|
self.viewport = None
|
||||||
|
|
||||||
def updateProfileToControls(self):
|
def updateProfileToControls(self):
|
||||||
self.objColor[0] = profile.getPreferenceColour('model_colour')
|
self.objColor[0] = profile.getPreferenceColour('model_colour')
|
||||||
|
@ -478,7 +479,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
|
||||||
def OnMouseMotion(self,e):
|
def OnMouseMotion(self,e):
|
||||||
cursorXY = 100000
|
cursorXY = 100000
|
||||||
radius = 0
|
radius = 0
|
||||||
if self.parent.objectsMaxV != None:
|
if self.parent.objectsMaxV is not None and self.viewport is not None:
|
||||||
radius = self.parent.objectsBounderyCircleSize * profile.getProfileSettingFloat('model_scale')
|
radius = self.parent.objectsBounderyCircleSize * profile.getProfileSettingFloat('model_scale')
|
||||||
|
|
||||||
p0 = numpy.array(gluUnProject(e.GetX(), self.viewport[1] + self.viewport[3] - e.GetY(), 0, self.modelMatrix, self.projMatrix, self.viewport))
|
p0 = numpy.array(gluUnProject(e.GetX(), self.viewport[1] + self.viewport[3] - e.GetY(), 0, self.modelMatrix, self.projMatrix, self.viewport))
|
||||||
|
|
|
@ -578,8 +578,8 @@ def getPluginList():
|
||||||
elif line[0].upper() == 'DEPEND':
|
elif line[0].upper() == 'DEPEND':
|
||||||
pass
|
pass
|
||||||
elif line[0].upper() == 'PARAM':
|
elif line[0].upper() == 'PARAM':
|
||||||
m = re.match('([a-zA-Z]*)\(([a-zA-Z_]*)(?:\:([^\)]*))?\) +(.*)', line[1].strip())
|
m = re.match('([a-zA-Z]*)\(([a-zA-Z_]*)(?::([^\)]*))?\) +(.*)', line[1].strip())
|
||||||
if m != None:
|
if m is not None:
|
||||||
item['params'].append({'name': m.group(1), 'type': m.group(2), 'default': m.group(3), 'description': m.group(4)})
|
item['params'].append({'name': m.group(1), 'type': m.group(2), 'default': m.group(3), 'description': m.group(4)})
|
||||||
else:
|
else:
|
||||||
print "Unknown item in effect meta data: %s %s" % (line[0], line[1])
|
print "Unknown item in effect meta data: %s %s" % (line[0], line[1])
|
||||||
|
|
Loading…
Reference in a new issue