跳到主要内容

Vfp.from_vox()

Vfp.from_vox(input_path, output_path, *, chunk_size=16, include_preview=True,
include_runtime_caches=True, include_render_cache=False,
include_animation_cache=True, include_thumbnail=True,
thumbnail_size=256, thumbnail_background="transparent") -> Vfp

面向对象的单模型 .vox → VFP API。缓存、预览、THMB 与背景参数同 Vfp.compile();成功时返回可立即读取和导出的 Vfp

from voxelkit import Vfp
asset = Vfp.from_vox("source.vox", "asset.vfp", thumbnail_background="#17212B")
asset.extract_thumbnail("asset.png")

仅支持 MAIN/SIZE/XYZI[/RGBA] 单模型 VOX。场景图或多模型 VOX 会抛出 VfpError