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/*.obbto new folder - copy
AssetBundlesfrom/Android/data/com.YoStarEN.AzurLane/files/AssetBundles
[!NOTE] only
painting,paintingsandpaintingfacefolder 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
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.3.tar.gz
(14.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
azurpaint-1.0.3-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file azurpaint-1.0.3.tar.gz.
File metadata
- Download URL: azurpaint-1.0.3.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f6cfc31a8d1cee68f23e600ec7222d0c4bd9ca9151e6bf153cf98611a05b3ea
|
|
| MD5 |
e48678d63d6c81959bd15523cb51da20
|
|
| BLAKE2b-256 |
9f430b06c3cf2478be4533777fcf267c0e3904e8dee9d426d50acfb0818d12ef
|
File details
Details for the file azurpaint-1.0.3-py3-none-any.whl.
File metadata
- Download URL: azurpaint-1.0.3-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e49ec88616d725bc78d2853b06dc782b6e4efb0e5033f8d4daa27bb5f409a8d
|
|
| MD5 |
0b2283ad7ca6305d25785fa0cf9daa84
|
|
| BLAKE2b-256 |
4d91c7b0e6ec362c6d71f1973bfb1983114a20dfdcbf4b252598b3a0a8d231b2
|