@@ -349,6 +349,10 @@ def makeLayerMaster(self):
349349 sourceDescriptor .path = "%s-%s%s" % (path , sourceDescriptor .layerName , ext )
350350 sourceDescriptor .filename = None
351351 sourceDescriptor .layerName = None
352+ if getDefault ("Batch.Debug" , False ):
353+ masterFont = self .fonts [sourceDescriptor .name ]
354+ layerPath = os .path .join (os .path .dirname (self .path ), sourceDescriptor .path )
355+ masterFont .save (layerPath )
352356
353357 def makeMasterOnDefaultLocation (self ):
354358 # create default location
@@ -458,7 +462,7 @@ def makeMasterGlyphsCompatible(self):
458462 self .makeGlyphOutlinesCompatible (glyphs )
459463 if getDefault ("Batch.Debug" , False ):
460464 for k , m in self .masters .items ():
461- tempPath = m . font . path .replace ( ".ufo" , "_%s.ufo " % k )
465+ tempPath = os . path . join ( os . path .dirname ( m . font . path ) , "%s_%s " % ( k , os . path . basename ( m . font . path )) )
462466 m .font .save (tempPath )
463467
464468 if self .compileGlyphOrder is None :
@@ -652,7 +656,6 @@ def _generateVariationFont(self, outPutPath):
652656 tempFont = defcon .Font (tempSavePath )
653657 tempFont .layers .defaultLayer = tempFont .layers [master .name ]
654658 tempFont .save ()
655- self ._generatedFiles .add (tempSavePath )
656659 except Exception :
657660 import traceback
658661 result = traceback .format_exc ()
@@ -673,6 +676,8 @@ def _generateVariationFont(self, outPutPath):
673676 # save the variation font
674677 varFont .save (outPutPath )
675678 except Exception :
679+ if getDefault ("Batch.Debug" , False ):
680+ print ("masterBinaryPaths:" , masterBinaryPaths )
676681 import traceback
677682 result = traceback .format_exc ()
678683 print (result )
0 commit comments