Azur Lane painting reconstructor/extractor.
Project description
azurpaint
Azur Lane painting reconstructor/extractor.
Install
Python 3.9.0 or higher is required
pip install azurpaint
Usage
Simple example to extract painting
- create new folder
- get and extract
/Android/obb/com.YoStarEN.AzurLane/*.obb
to new folder - copy
AssetBundles
from/Android/data/com.YoStarEN.AzurLane/files/AssetBundles
[!NOTE] only
painting
,paintings
andpaintingface
folder are required fromAssetBundles
.
from pathlib import Path
from azurpaint import Azurpaint
from azurpaint.exception import PrefabNotFound
# extract painting with default expression/face
def extract(asset_bundle_path, prefab_path):
try:
azurpaint = Azurpaint(asset_bundle_path, prefab_path)
# search dependencies automatically within AssetBundles (root)
# this is still in experimental mode so far on testing the result is good
# load_dependencies only searching in local file and it doesn't know
# if there any missing dependency it doesn't know what file it is
# so you should provide complete asset include extracted OBB before running this
azurpaint.load_dependencies()
# PIL.Image.Image
return azurpaint.create()
except PrefabNotFound:
print(f"{prefab_path} is not an prefab.")
# extract painting with all face/expression into output_dir
def extract_all_face(asset_bundle_path, prefab_path, output_dir):
try:
azurpaint = Azurpaint(asset_bundle_path, prefab_path)
azurpaint.load_dependencies()
Path(output_dir).mkdir(parents=True, exist_ok=True)
azurpaint.create().save(Path(output_dir, f"{azurpaint.prefab.name}-default.png"))
for face in azurpaint.face_list:
azurpaint.change_face(face)
azurpaint.create().save(Path(output_dir, f"{azurpaint.prefab.name}-{face}.png"))
except PrefabNotFound:
print(f"{prefab_path} is not an prefab.")
if __name__ == '__main__':
# azurpaint require asset that have .prefab
# will raise PrefabNotFound if file is not an prefab
extract('path_to/AssetBundles', 'painting/tashigan')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
azurpaint-1.0.0.tar.gz
(17.9 kB
view hashes)
Built Distribution
azurpaint-1.0.0-py3-none-any.whl
(20.0 kB
view hashes)
Close
Hashes for azurpaint-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d7bf5187762497ede24e152f41af95b4fbda3b213faa49ba8bc54a37e49fc3 |
|
MD5 | 30a0508b24f4bfa9277185dfa7858b67 |
|
BLAKE2b-256 | 64ce58d90503e4422ecfb04edb6412926beca5914c6c2d9fc2c5e6bc2cba0b5f |