Map saving first pass
This commit is contained in:
@@ -3,6 +3,7 @@ from PIL import Image
|
||||
from args import args
|
||||
import sys
|
||||
import datetime
|
||||
from assetcache import assetCache, assetGetCache
|
||||
|
||||
palettes = []
|
||||
|
||||
@@ -22,6 +23,9 @@ def extractPaletteFromImage(image):
|
||||
|
||||
def processPalette(asset):
|
||||
print(f"Processing palette: {asset['path']}")
|
||||
cache = assetGetCache(asset['path'])
|
||||
if cache is not None:
|
||||
return cache
|
||||
|
||||
paletteIndex = len(palettes)
|
||||
image = Image.open(asset['path'])
|
||||
@@ -72,7 +76,7 @@ def processPalette(asset):
|
||||
}
|
||||
|
||||
palettes.append(palette)
|
||||
return palette
|
||||
return assetCache(asset['path'], palette)
|
||||
|
||||
def processPaletteList():
|
||||
data = f"// Auto-generated palette list\n"
|
||||
|
Reference in New Issue
Block a user