#NEWLINE# def generate( self , path = '' , autorotate = False , debug = False ) : #NEWLINE# #INDENT# 'Generate sheets/variants' #NEWLINE# Console . info ( 'Generating sprite sheet variants...' ) #NEWLINE# Console . indent ( ) #NEWLINE# ( sheets , count ) = self . packBest ( autorotate ) #NEWLINE# data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( pos , sheet ) in enumerate ( sheets ) : #NEWLINE# #INDENT# Console . info ( ( 'Writing image (%dx%dpx) with %d images' % ( sheet . width , sheet . height , len ( sheet ) ) ) ) #NEWLINE# name = ( 'jasysprite_%d.png' % pos ) #NEWLINE# sheet . write ( os . path . join ( self . base , path , name ) , count ) #NEWLINE# data [ name ] = sheet . export ( ) #NEWLINE# #UNINDENT# Console . outdent ( ) #NEWLINE# Console . info ( 'Exporting data...' ) #NEWLINE# script = os . path . join ( self . base , path , ( 'jasysprite.%s' % self . dataFormat ) ) #NEWLINE# writeConfig ( data , script )