nx_nxa_skin.nx
buildroot/runtime/nx_nxa_skin.nx
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
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
structs
| none |
consts
| 13 | const G_MAGIC_20000: i64 = 20000 |
| 14 | const G_MAGIC_2047: i64 = 2047 |
| 15 | const G_MAGIC_1048575: i64 = 1048575 |
| 16 | const G_MAGIC_4503599627370496: i64 = 4503599627370496 |
| 17 | const G_MAGIC_4090: i64 = 4090 |
| 18 | const G_MAGIC_99990: i64 = 99990 |
| 19 | const G_MAGIC_4096: i64 = 4096 |
| 20 | const G_MAGIC_7500: i64 = 7500 |
| 21 | const G_MAGIC_500000: i64 = 500000 |
| 22 | const G_MAGIC_4611686018427387903: i64 = 4611686018427387903 |
| 25 | const G_MO: i64 = 16 // model ids x4096 |
| 26 | const G_LO: i64 = 4112 // limb flags x4096 |
| 27 | const G_CID: i64 = 8208 // cluster ids x512 |
| 28 | const G_CIX: i64 = 8720 // cluster Indexes meta (off,alen,enc,clen) x512x4 |
| 29 | const G_CW: i64 = 10768 // cluster Weights meta x512x4 |
| 30 | const G_CT: i64 = 12816 // cluster TransformLink meta x512x4 |
| 31 | const G_CONN: i64 = 14864 // connection pairs (src,dst) x100000x2 |
| 32 | const G_SID: i64 = 214864 // Skin deformer ids x64 |
| 33 | const G_PR: i64 = 216000 // per-model PreRotation millideg x3 |
| 34 | const G_LR: i64 = 228288 // per-model Lcl Rotation default millideg x3 |
| 35 | const G_LT: i64 = 240576 // per-model Lcl Translation default units x3 |
| 36 | const G_PF: i64 = 252864 // per-model flags: 1=pre 2=lclrot 4=lclt |
| 37 | const G_WORDS: i64 = 258000 |
functions
| 39 | func skw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 40 | func skn(v: i64) -> i64 |
| 52 | func sk_u32(b: *u8, o: i64) -> i64 |
| 56 | func sk_u64(b: *u8, o: i64) -> i64 { return sk_u32(b, o) | (sk_u32(b, o + 4) << 32) } |
| 59 | func sk_f64(b: *u8, o: i64, scale: i64) -> i64 |
| 81 | func sk_walk(b: *u8, flen: i64, off0: i64, big: i64, G: *i64, ctx: i64, gctx: i64, mctx: i64) -> i64 |
| 269 | func sk_arr(b: *u8, off: i64, alen: i64, enc: i64, clen: i64, esz: i64) -> *u8 |
| 276 | func main(argc: i64, argv: *i64) -> i64 |