code wiki / (root) / nx_nxa_skin.nx

nx_nxa_skin.nx

buildroot/runtime/nx_nxa_skin.nx

43728 B1057 linesdepth 7pulls 12 transitivereach 1 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 5 imports · 1 importers

nx_syscalls.nx nx_zlib_wrap.nx nx_nxa.nx nx_nxa_fk.nx nx_fbx_core.nx nx_nxa_skin.nx nx_nxa_skin_scalar_negative_t36.nx

imports: nx_syscalls.nxnx_zlib_wrap.nxnx_nxa.nxnx_nxa_fk.nxnx_fbx_core.nx

imported by: nx_nxa_skin_scalar_negative_t36.nx

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

main skw sys_write sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_map_file sys_openat_rd sys_lseek sys_close sk_u32 fbxc_unit_scale_micro fbxc_version fbxc_u32 fbxc_big fbxc_hdr fbxc_u64 fbxc_u32 ↻ fbxc_u32 ↻ fbxc_name_is fbxc_u32 ↻ fbxc_f64_p20 fbxc_u64 ↻ fbxc_prop_size fbxc_u32 ↻ skn sys_mmap ↻ sys_write ↻

structs

none

consts

18const G_USF: i64 = 357091
19const G_MAGIC_20000: i64 = 20000
20const G_MAGIC_2047: i64 = 2047
21const G_MAGIC_1048575: i64 = 1048575
22const G_MAGIC_4503599627370496: i64 = 4503599627370496
23const G_MAGIC_4090: i64 = 4090
24const G_MAGIC_99990: i64 = 99990
25const G_MAGIC_4096: i64 = 4096
26const G_MAGIC_7500: i64 = 7500
27const G_MAGIC_500000: i64 = 500000
28const G_MAGIC_4611686018427387903: i64 = 4611686018427387903
31const G_MO: i64 = 16 // model ids x4096
32const G_LO: i64 = 4112 // limb flags x4096
42const G_CID: i64 = 8208 // cluster ids x8192
43const G_CIX: i64 = 16400 // cluster Indexes meta (off,alen,enc,clen) x8192x4
44const G_CW: i64 = 49168 // cluster Weights meta x8192x4
45const G_CT: i64 = 81936 // cluster TransformLink meta x8192x4
46const G_CONN: i64 = 114704 // connection pairs (src,dst) x100000x2
47const G_SID: i64 = 314704 // Skin deformer ids x64
48const G_PR: i64 = 316000 // per-model PreRotation millideg x3
49const G_LR: i64 = 328288 // per-model Lcl Rotation default millideg x3
50const G_LT: i64 = 340576 // per-model Lcl Translation default units x3
51const G_PF: i64 = 352864 // per-model flags: 1=pre 2=lclrot 4=lclt
52const G_WORDS: i64 = 358000
58const G_GT: i64 = 356960
59const G_GTCAP: i64 = 64
60const G_GTOV: i64 = 357089
63const G_CLUSTER_CAP: i64 = 8190
66const G_CLOV: i64 = 357090

functions

68func 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 2: mainmain calls 1: sys_write
69func skn(v: i64) -> i64
called by 2: mainmain calls 2: sys_mmapsys_write
81func sk_u32(b: *u8, o: i64) -> i64
85func 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
88func sk_f64(b: *u8, o: i64, scale: i64) -> i64
called by 3: sk_walkmainmain calls 1: sk_u32
110func sk_walk(b: *u8, flen: i64, off0: i64, big: i64, G: *i64, ctx: i64, gctx: i64, mctx: i64) -> i64
314func sk_arr(b: *u8, off: i64, alen: i64, enc: i64, clen: i64, esz: i64) -> *u8
called by 1: main
321func main(argc: i64, argv: *i64) -> i64