Ejemplo n.º 1
0
 def deployAsset(self, node, context):
     super(PrebuiltAtlasAssetManager, self).deployAsset(node, context)
     for key, value in node.objectFiles.items():
         if not key.startswith('pixmap'): continue
         pixmapPath = value
         mappedPath = context.getAbsFile(pixmapPath)
         if context.isNewFile(mappedPath):
             # print( node.getNodePath(), mappedPath )
             ImageHelpers.convertToWebP(mappedPath)
Ejemplo n.º 2
0
	def deployAsset( self, node, context ):
		super( PrebuiltAtlasAssetManager, self ).deployAsset( node, context )
		for key, value in node.objectFiles.items():
			if not key.startswith( 'pixmap' ): continue
			pixmapPath = value
			mappedPath = context.getAbsFile( pixmapPath )
			if context.isNewFile( mappedPath ):
				# print( node.getNodePath(), mappedPath )
				ImageHelpers.convertToWebP( mappedPath )
Ejemplo n.º 3
0
    def _convertTextureFormat(self, fullPath, format, outputPath=None):
        if format == 'auto':
            format = 'webp'
        else:
            format = 'png'

        print 'converting texture', fullPath, format

        if format == 'webp':
            ImageHelpers.convertToWebP(fullPath)
        elif format == 'png':
            pass
        elif format == 'PVR-2':
            ImageHelpers.convertToPVR(fullPath, outputPath, bbp=2)
        elif format == 'PVR-4':
            ImageHelpers.convertToPVR(fullPath, outputPath, bbp=4)
Ejemplo n.º 4
0
	def _convertTextureFormat( self, fullPath, format, outputPath = None ):
		if format == 'auto':
			format = 'webp'
		else:
			format = 'png'
		
		print 'converting texture', fullPath, format

		if format == 'webp':
			ImageHelpers.convertToWebP( fullPath )
		elif format == 'png':
			pass
		elif format == 'PVR-2':
			ImageHelpers.convertToPVR( fullPath, outputPath, bbp = 2 )
		elif format == 'PVR-4':
			ImageHelpers.convertToPVR( fullPath, outputPath, bbp = 4 )