OpenBF1942-Plus
Refractor 1, rebuilt from scratch
Loading...
Searching...
No Matches
tm Namespace Reference

Functions

 parse (d)

Variables

 VERTEX = struct.Struct("<3f3fI2f2f")
tuple INDICES_PER = (24, 3, 24)
 vm = load_mod(sys.argv[1], sys.argv[2])
 t = parse(vm.vfs.read(sys.argv[3].lower().removesuffix(".tm") + ".tm"))

Detailed Description

Reader for Refractor tree meshes (.tm, version 3). Stdlib only.

Spec: docs/formats/tm.md

Usage: tm.py <BF1942_DIR> <mod> <treeMesh/name>   print groups and counts

Function Documentation

◆ parse()

tm.parse ( d)
-> {bbox, groups: [[(first_index, count, texture)] x 3], vertices: [tuple], indices: [int]}

Variable Documentation

◆ INDICES_PER

tuple tm.INDICES_PER = (24, 3, 24)

◆ t

tm.t = parse(vm.vfs.read(sys.argv[3].lower().removesuffix(".tm") + ".tm"))

◆ VERTEX

tm.VERTEX = struct.Struct("<3f3fI2f2f")

◆ vm

tm.vm = load_mod(sys.argv[1], sys.argv[2])