๐ Usage#
Easiest Way: Use Drag & Drop. Just drag and drop files you want convert onto
scfile.exe. File paths will automatically be taken as arguments, converted to new format, and saved in same location.File Associations: You can set
scfile.exeas the default application for opening model and texture files. When a file is โopenedโ this way, it will be automatically converted to new format and saved in same location.Via Console:
scfileis primarily a CLI. If youโre comfortable with the terminal, youโll figure it out fast. Check out arguments and options withscfile.exe --help.Usage: scfile [PATHS]... [OPTIONS] Options: -O, --output DIRECTORY Output results directory. -F, [obj|glb|dae|ms3d] Preferred format for models. --relative Preserve directory structure from source in output. --parent Use parent directory as starting point in relative directory. --skeleton Parse armature in models. --animation Parse builtin clips in models. --unique Ensure file saved with unique name, avoiding overwrites. --version Show the version and exit. --help Show help message and exit.
As Library: Install release build using
pip install sc-fileor any other package manager.More details in API Referenceโฆ
Simple code example#from pathlib import Path from scfile import UserOptions, convert models = Path("models") output = Path("output") options = UserOptions(parse_skeleton=True, overwrite=False) for path in models.rglob("*.mcsb"): convert.mcsb_to_glb(source=path, output=output, options=options)
This code takes all
.mcsbfiles frommodelsdirectory, converts them to.glb, and dumps intooutput.
Output Model Formats#
--mdlformat / -F parameter followed by desired format suffix.-F obj or -F dae.scfile.exe model.mcsb -F obj -F dae -F ms3dmodel.obj, model.dae, model.ms3d.Default Model Formats#
-F parameter):consts.py::DefaultModelFormats.STANDARD: .obj.--skeleton or --animation is specified:consts.py::DefaultModelFormats.SKELETON: .glb.Two ways to change it:
Easiest Way: Create a shortcut for the
scfile.exe. At end of ยซTargetยป field, add desired formats like in examples above.Modify Source Code: Alternatively, tweak this consts in source code and compile yourself.
Model Skeleton#
--skeleton flag..glb, .dae, .ms3d.Model Animation#
--animation flag..glb.Path Arguments#
File and directory paths are accepted. Patterns also work. Quotes are required when paths include spaces.
You can use full paths:
scfile.exe "C:/foo/model.mcsb"
Or relative paths:
scfile.exe "bar/model.mcsb"
You can specify a directory, only files with supported formats will be processed:
scfile.exe "C:/assets"
You can also use patterns. Each file matching the pattern will be passed as a separate argument:
scfile.exe "C:/assets/*.ol"
You can combine multiple arguments, mixing files, directories, and patterns. However, use this with caution and ensure you understand the implications:
scfile.exe "C:/foo/model.mcsb" "bar/model.mcsb" "C:/assets" "C:/assets/*.ol"
Output Directory#
You can specify --output / -O parameter to change it.
scfile.exe "C:/game/assets" --output "D:/output"
Output Overwriting#
--unique flag.model (2).obj, model (3).obj and etc.Output Structure#
--relative flag.--output directory.--parent flag../assets/
โโโ armor/albatros.mcsb
โโโ items/vodka.ol
Default Structure#
scfile.exe "./assets" --output "./output"
./output/
โโโ albatros.obj
โโโ vodka.dds
Relative Structure#
scfile.exe "./assets" --output "./output" --relative
./output/
โโโ armor/albatros.obj
โโโ items/vodka.dds
Parent Structure#
scfile.exe "./assets" --output "./output" --parent
./output/
โโโ assets/armor/albatros.obj
โโโ assets/items/vodka.dds