loicsander/Robofont-scripts

anchors cause trouble in groups with boolean operations

Closed this issue · 5 comments

see title :)

Traceback (most recent call last):
  File "lib/doodleDelegate.pyc", line 157, in sendEvent_
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaBase.py", line 196, in action_
    self.callback(sender)
  File "penBallWizard.py", line 107, in setArgumentValue
  File "penBallWizard.py", line 143, in updatePreview
  File "penBallWizard.py", line 114, in processGlyphs
  File "penBallWizard.py", line 129, in filterGlyphs
  File "lib/fontObjects/robofabWrapper.pyc", line 3188, in getRepresentation
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 641, in getRepresentation
    representation = factory(self, self.getParent(), **kwargs)
  File "/Users/thomjanssen/Library/Application Support/RoboFont/plugins/PenBallWizard.roboFontExt/lib/objects/glyphFilter.py", line 61, in __call__
    outputGlyph = BooleanGlyph(outputGlyph) % BooleanGlyph(filteredGlyph)
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/booleanOperations/booleanGlyph.py", line 124, in __init__
    glyph.drawPoints(pen)
  File "lib/fontObjects/robofabWrapper.pyc", line 2733, in drawPoints
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 310, in drawPoints
    anchor.drawPoints(pointPen)
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/anchor.py", line 76, in drawPoints
    pointPen.endPath()
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/booleanOperations/booleanGlyph.py", line 34, in endPath
    self._flushContour()
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/booleanOperations/booleanGlyph.py", line 21, in _flushContour
    self._glyph.anchors.append((pt, name))
NameError: global name 'pt' is not defined

Unto the next one :') (thanks for testing!)

I couldn’t reproduce the issue exactly but I think I may have found a solution. Can you check out the updated version?

Oh No! Now everything is broken... ;)

Traceback (most recent call last):
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaEditText.py", line 11, in controlTextDidChange_
    self.action_(notification.object())
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaBase.py", line 196, in action_
    self.callback(sender)
  File "penBallWizard.py", line 183, in stringInput
  File "penBallWizard.py", line 143, in updatePreview
  File "penBallWizard.py", line 114, in processGlyphs
  File "penBallWizard.py", line 129, in filterGlyphs
  File "lib/fontObjects/robofabWrapper.pyc", line 3188, in getRepresentation
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 641, in getRepresentation
    representation = factory(self, self.getParent(), **kwargs)
  File "/Users/thomjanssen/Library/Application Support/RoboFont/plugins/PenBallWizard.roboFontExt/lib/objects/glyphFilter.py", line 37, in __call__
    outputGlyph = self.cleanGlyph(outputGlyph)
UnboundLocalError: local variable 'outputGlyph' referenced before assignment
Traceback (most recent call last):
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaEditText.py", line 11, in controlTextDidChange_
    self.action_(notification.object())
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaBase.py", line 196, in action_
    self.callback(sender)
  File "penBallWizard.py", line 183, in stringInput
  File "penBallWizard.py", line 143, in updatePreview
  File "penBallWizard.py", line 114, in processGlyphs
  File "penBallWizard.py", line 129, in filterGlyphs
  File "lib/fontObjects/robofabWrapper.pyc", line 3188, in getRepresentation
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 641, in getRepresentation
    representation = factory(self, self.getParent(), **kwargs)
  File "/Users/thomjanssen/Library/Application Support/RoboFont/plugins/PenBallWizard.roboFontExt/lib/objects/glyphFilter.py", line 37, in __call__
    outputGlyph = self.cleanGlyph(outputGlyph)
UnboundLocalError: local variable 'outputGlyph' referenced before assignment
Traceback (most recent call last):
  File "lib/doodleDelegate.pyc", line 157, in sendEvent_
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaEditText.py", line 11, in controlTextDidChange_
    self.action_(notification.object())
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaBase.py", line 196, in action_
    self.callback(sender)
  File "penBallWizard.py", line 183, in stringInput
  File "penBallWizard.py", line 143, in updatePreview
  File "penBallWizard.py", line 114, in processGlyphs
  File "penBallWizard.py", line 129, in filterGlyphs
  File "lib/fontObjects/robofabWrapper.pyc", line 3188, in getRepresentation
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 641, in getRepresentation
    representation = factory(self, self.getParent(), **kwargs)
  File "/Users/thomjanssen/Library/Application Support/RoboFont/plugins/PenBallWizard.roboFontExt/lib/objects/glyphFilter.py", line 37, in __call__
    outputGlyph = self.cleanGlyph(outputGlyph)
UnboundLocalError: local variable 'outputGlyph' referenced before assignment

Ah yes, stupid. Didn’t fail on my side because I hadn’t restarted Robofont yet… Should work now, I’m finding other little issues along the way though. Keep me posted ; )

On this issue no errors anymore... But more to come :)