|
OpenBF1942-Plus
Refractor 1, rebuilt from scratch
|
Functions | |
| _names (d, o, count) | |
| parse_ske (d) | |
| parse_skn (d) | |
| parse_baf (d) | |
| _mul (a, b) | |
| ske_local (m) | |
| quat_local (q, p) | |
| pose (skeleton, animations=(), frame=0, biped_root=False) | |
| skin (vertices, records, names, world) | |
Variables | |
| vm = load_mod(sys.argv[1], sys.argv[2]) | |
| path = sys.argv[3].lower() | |
| data = vm.vfs.read(path) | |
| recs | |
| names | |
| nframes | |
| _ | |
Skeletons (.ske), skins (.skn) and animations (.baf). Stdlib only. Spec: docs/formats/anim.md Usage: anim.py <BF1942_DIR> <mod> <file.ske|.skn|.baf> print a summary
|
protected |
|
protected |
| anim.parse_baf | ( | d | ) |
-> (bone names, frame count, [per bone: 7 channels of frame values]); channels qx qy qz qw px py pz.
| anim.parse_ske | ( | d | ) |
-> [(name, parent index or -1, 12 floats: row-major [R | t] relative to the parent)]
| anim.parse_skn | ( | d | ) |
-> (records [(pos, [(bone, weight, offset)])], bone names); bone indexes into the names.
| anim.pose | ( | skeleton, | |
| animations = (), | |||
| frame = 0, | |||
| biped_root = False ) |
World matrix per bone name. Bones an animation covers use its frame; others keep the skeleton. biped_root: biped rigs animate in 3ds Max space (up -z, facing +y); a quarter turn about x makes them Y-up facing +z, standing on the origin.
| anim.quat_local | ( | q, | |
| p ) |
Rotation of the conjugate quaternion (see engine/anim.cpp: read straight, soldiers lean back).
| anim.ske_local | ( | m | ) |
| anim.skin | ( | vertices, | |
| records, | |||
| names, | |||
| world ) |
Skinned position per mesh vertex; mesh vertices are matched to skin records by position.
|
protected |
| anim.data = vm.vfs.read(path) |
| anim.names |
| anim.nframes |
| anim.path = sys.argv[3].lower() |
| anim.recs |
| anim.vm = load_mod(sys.argv[1], sys.argv[2]) |