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)
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 )
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)
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 )