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.1.tar.gz
(14.9 kB
view hashes)
Built Distribution
azurpaint-1.0.1-py3-none-any.whl
(15.9 kB
view hashes)
Close
Hashes for azurpaint-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32768d0f6f0ae7f8cf4e5b4a4317244868215fae2e9ce4e0b5190bd15c598e2d |
|
MD5 | e4b5a80edbf58fea3d6cf6486d50d812 |
|
BLAKE2b-256 | ff2e3d76ac7836353bcd8dd52d8aa9536119bc5c53deb4dc34f36fc8c4bcfdb4 |