A lightweight Python Library for parsing and exporting the Roblox Mesh Format supports Mesh V1 to V5
- Python 3.10+ ( Older versions may work )
- structs
- dataclasses
- sys
All dependencies used inside should already be installed with your python installation by default
python3 RBXMesh.py ExampleMesh.mesh
from RBXMesh import FileMeshData, read_mesh_data
with open("ExampleMesh.mesh", "rb") as f:
meshBytes : bytearray = f.read()
meshData : FileMeshData = read_mesh_data( meshBytes )
Supports exports in Mesh V2 and V3
python3 RBXMesh.py ExampleMesh.mesh 2.0
python3 RBXMesh.py ExampleMesh.mesh 3.0
from RBXMesh import FileMeshData, read_mesh_data, export_mesh_v2, export_mesh_v3
meshData : FileMeshData = read_mesh_data( meshBytes )
with open("ExportedMesh.mesh.v2", "wb") as f:
f.write( export_mesh_v2(meshData) )
with open("ExportedMesh.mesh.v3", "wb") as f:
f.write( export_mesh_v3(meshData) )
- Sometimes fails to parse Mesh V4.01