v5.0.0#
✨ Added#
GUI#
Added Graphical interface (
PySide6). Launches when no arguments given.ConverterTab: drag & drop, file type filters, output structure options.MapCacheTab:.mdatto.mcaconversion with threading.VersionWidget: update check popup with GitHub release lookup.
CLI#
New command structure:
scfile convertandscfile mapcache.scfile.__main__: automatically runsconvertwhen a file or directory is given as first argument.--updatesflag for version check.--on-conflict(overwrite/rename/skip).paramsmodule with click types:Files,Output,MapCacheDir,Formats,OnConflict.
Formats#
EfkmodelDecoder: new source format.efkmodel(geometry only).McalDecoder: new source format.mcal(animation library, no export).MdatDecoder: new source format.mdat(cache regions).McaEncoder: new output format.mca(anvil regions).FbxEncoder: new output format.fbx(geometry only).NBT encoding utilities in
nbt.nbt(encode,compound,list, etc.).Block ID mapping table for Anvil format in
mca.mapping.
Core#
StructIO: single class (replacesStructBytesIO/StructFileIO).BaseFile: unified binary stream adapter (supports path, bytes, IO).FileDecoder.convert_tonow acceptsoutputparameter (IOStream).FileEncoder.transform()hook and transforms pipeline.RegionContentcontainer for world chunks.RegionChunk,ChunkHeaderstructures.ModelContentfields:uv2,tangents,colors.FileEncoder,FileDecoder:prelude()hook.
Models#
transformsmodule: scene transformation functions.ModelMeshfields:uv2,tangents,colors,link_space,uv_origin,uv_sign,max_influences.ModelSkeletonfields:space,hierarchy.AnimationClip: replacedtransformswithrotationsandtranslations.SkeletonBonepropertyslug.New Enums:
UVOrigin,UVSign,LinkSpace,SkeletonSpace,SkeletonHierarchy,AnimationTranslation,AnimationRotation.New Type Aliases:
EulerAngles,TransformMatrix,BindPose, etc.
Convert#
Converter registry:
converters()andregistry()functions;@converterdecorator registers format pairs.
Utils#
New package:
scfile.utils.files:resource(),resolve(),walk(),destination().versions:Versiondataclass with parsing and comparison.updates: update checking against GitHub API.regions: region merging from scattered map cache files.cli: callbacksversion_callback,updates_callback.
📝 Changed#
Core#
UserOptionsrenamed toOptions.UserOptions.parse_skeleton→Options.skeleton.UserOptions.parse_animation→Options.animation.UserOptions.overwritereplaced byOptions.on_conflict.FileEncoder.save_as(),export_as()now returnSelf.
Formats#
Model Decoders: syntactic sugar
to_XXX()replaced byas_XXX(). Now they return empty encoder,encode()must be called explicitly.Model Decoders: replaced
prepare()with transforms list.GlbEncoder._add_meshesnow writesuv2andtangentswhen present.DaeEncoder._add_controller_sourcesnow checksmax_influences > 0.McsaFileIO._linksnormalizes bone weights.
Consts#
NBT_FILENAMESrenamed toSUPPORTED_NBT.
Tests#
Coverage except
scfile.guinow 100%.
🐛 Fixed#
McsaDecoder: UV2 and Tangents parsing (export only in.glb).GlbEncoder: binary data on meshes without skinning links when skeleton presented.
🗑️ Removed#
CLI Flag
--unique(replaced by--on-conflict rename).FileFormat.ITEMNAMES(usesNBT).McsaBoneLinksError(silent fallback).scfile.cli.commands.py,scfile.cli.types.py,scfile.cli.utils.py.SceneCounts,MeshCounts.structures.types.enums.FileMode.
♻️ Refactored#
Structure#
Moved
core.iopackage tocore.structio.Moved
core.contextpackage tocore.contentandcore.options.Moved
animation,mesh,skeleton,scene,flags,vectorsintostructures.models.Moved
consts.McsaUnitsintoformats.mcsa.consts.Moved
consts.OlStringintoformats.ol.io.Merged
StructBytesIOandStructFileIOinto singleStructIOclass.Split
AnimationClip.transformsintorotationsandtranslations.Removed
convert.legacy(merged back intoconvert.formats).
Rename#
ModelMesh.positions→vertices.ModelMesh.textures→uv1.TextureArrayContent→TexarrContent.TextureArrayDecoder→TexarrDecoder.TextureArrayEncoder→TexarrEncoder.NbtBytesIO→NbtBufferIO.McsaModel→ModelDefaults.MeshOrigin→MeshBounds.