code wiki / (root) / nx_nxa_skin.nx

nx_nxa_skin.nx

buildroot/runtime/nx_nxa_skin.nx

37119 B950 linesdepth 7pulls 11 transitivereach 0 importersview sourcekind tooltopic nxa
docsdependenciesstructsconstsfunctions

about

nx_nxa_skin.nx -- RIG IMPORTER: fills the NXA's SKEL + SKIN sections from a binary FBX. Walks the FBX id-graph (Model/LimbNode joints, Deformer Clusters with Indexes/Weights/ TransformLink bind matrices, the Connections table) and emits a 5-section NXA: VERT/TRIS/CLUS copied from the mesh import, SKEL = joints [parent][t mm][quat q12=identity] (delta-LBS convention: animation is applied RELATIVE to bind, so identity bind quats are exact), SKIN = per-vertex top-4 joints + q12 weights normalized to sum 4096. usage: nx_nxa_skin <in.fbx> <in.nxa> <out.nxa> license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_zlib_wrap.nx nx_nxa.nx nx_nxa_fk.nx nx_nxa_skin.nx

imports: nx_syscalls.nxnx_zlib_wrap.nxnx_nxa.nxnx_nxa_fk.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main skw sys_write sys_mmap sys_map_file sys_openat_rd sys_lseek sys_close sk_u32 sk_walk sk_u64 sk_u32 ↻ sk_u32 ↻ sk_f64 sk_u32 ↻ sk_walk ↻ skn sys_mmap ↻ sys_write ↻ sk_arr nx_zlib_inflate sys_mmap ↻ nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_byte_align nx_bitstream_read_byte_ali nx_bitstream_byte_align ↻ _deflate_build_static_litl sys_mmap ↻ nx_huffman_build _deflate_build_static_dist sys_mmap ↻ nx_huffman_build ↻ _deflate_decode_huffman_bl

structs

none

consts

13const G_MAGIC_20000: i64 = 20000
14const G_MAGIC_2047: i64 = 2047
15const G_MAGIC_1048575: i64 = 1048575
16const G_MAGIC_4503599627370496: i64 = 4503599627370496
17const G_MAGIC_4090: i64 = 4090
18const G_MAGIC_99990: i64 = 99990
19const G_MAGIC_4096: i64 = 4096
20const G_MAGIC_7500: i64 = 7500
21const G_MAGIC_500000: i64 = 500000
22const G_MAGIC_4611686018427387903: i64 = 4611686018427387903
25const G_MO: i64 = 16 // model ids x4096
26const G_LO: i64 = 4112 // limb flags x4096
27const G_CID: i64 = 8208 // cluster ids x512
28const G_CIX: i64 = 8720 // cluster Indexes meta (off,alen,enc,clen) x512x4
29const G_CW: i64 = 10768 // cluster Weights meta x512x4
30const G_CT: i64 = 12816 // cluster TransformLink meta x512x4
31const G_CONN: i64 = 14864 // connection pairs (src,dst) x100000x2
32const G_SID: i64 = 214864 // Skin deformer ids x64
33const G_PR: i64 = 216000 // per-model PreRotation millideg x3
34const G_LR: i64 = 228288 // per-model Lcl Rotation default millideg x3
35const G_LT: i64 = 240576 // per-model Lcl Translation default units x3
36const G_PF: i64 = 252864 // per-model flags: 1=pre 2=lclrot 4=lclt
37const G_WORDS: i64 = 258000

functions

39func skw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
40func skn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
52func sk_u32(b: *u8, o: i64) -> i64
56func sk_u64(b: *u8, o: i64) -> i64 { return sk_u32(b, o) | (sk_u32(b, o + 4) << 32) }
called by 1: sk_walk calls 1: sk_u32
59func sk_f64(b: *u8, o: i64, scale: i64) -> i64
called by 2: sk_walkmain calls 1: sk_u32
81func sk_walk(b: *u8, flen: i64, off0: i64, big: i64, G: *i64, ctx: i64, gctx: i64, mctx: i64) -> i64
269func sk_arr(b: *u8, off: i64, alen: i64, enc: i64, clen: i64, esz: i64) -> *u8
called by 1: main calls 1: nx_zlib_inflate
276func main(argc: i64, argv: *i64) -> i64