code wiki / (root) / nx_fbx_core.nx

nx_fbx_core.nx

buildroot/runtime/nx_fbx_core.nx

11815 B270 linesdepth 6pulls 6 transitivereach 99 importersview sourcekind librarytopic fbx
docsdependenciesstructsconstsfunctions

about

nx_fbx_core.nx -- shared binary-FBX FORMAT knowledge. One place that knows how a Kaydara file is laid out, so consumers differ only in WHAT THEY EXTRACT, not in how they read a node. ★WHY THIS EXISTS (seq1788). The node walk was written twice: nx_fbx_rig.nx (rig survey -- joints, skin clusters, weights, animation curves; emits nothing by design) and nx_fbx_import.nx (geometry -> fx1024). The PURPOSES are genuinely different; the FORMAT READING was one thing duplicated. Worse, the two disagreed on capability: nx_fbx_rig handles BOTH u32 and u64 node offsets, while the geometry reader refused v7500+ outright. Consolidating here means a node-format bug has ONE home and geometry extraction inherits u64 support instead of re-deriving it. ★VERSION WIDENS THE HEADER, NOT JUST THE OFFSETS. v<7500: EndOffset/NumProps/PropListLen are u32 and the record header is 13 bytes. v>=7500: all three are u64 and the header is 25. Getting this wrong does not error -- it mis-strides the whole tree and yields plausible counts over garbage, which is exactly the failure shape this lane keeps meeting. license_tier: ORIGINAL

dependencies 1 imports · 9 importers

nx_deflate.nx nx_fbx_core.nx nx_fbx_bind.nx nx_fbx_bind_scratch_candidate_t181 nx_fbx_bind_scratch_ready_t181.nx nx_fbx_import.nx nx_fbx_texm.nx nx_nxa_skin.nx nx_nxa_skin_authored_t36.nx nx_nxa_skin_authored_t37.nx nx_nxa_skin_authored_witness_t140.

imports: nx_deflate.nx

imported by: nx_fbx_bind.nxnx_fbx_bind_scratch_candidate_t181.nxnx_fbx_bind_scratch_ready_t181.nxnx_fbx_import.nxnx_fbx_texm.nxnx_nxa_skin.nxnx_nxa_skin_authored_t36.nxnx_nxa_skin_authored_t37.nxnx_nxa_skin_authored_witness_t140.nx

structs

none

consts

18const FBXC_MAXOUT: i64 = 134217728
20const FBXC_END: i64 = 0
21const FBXC_NPROPS: i64 = 1
22const FBXC_PLEN: i64 = 2
23const FBXC_NAMELEN: i64 = 3
24const FBXC_NAMEOFF: i64 = 4
25const FBXC_PROPSOFF: i64 = 5
26const FBXC_HDRSZ: i64 = 6
27const FBXC_OUTN: i64 = 7
178const FBXC_MICRO: i64 = 1000000
179const FBXC_P20: i64 = 1048576
180const FBXC_TOPOFF: i64 = 27

functions

29func fbxc_u32(b: *u8, o: i64) -> i64
32func fbxc_u64(b: *u8, o: i64) -> i64 { return fbxc_u32(b, o) | (fbxc_u32(b, o + 4) << 32) }
33func fbxc_i32(b: *u8, o: i64) -> i64
38func fbxc_i64le(b: *u8, o: i64) -> i64
45func fbxc_version(b: *u8, n: i64) -> i64
53func fbxc_big(ver: i64) -> i64 { if ver >= 7500 { return 1 } return 0 }
57func fbxc_hdr(b: *u8, n: i64, pos: i64, big: i64, out: *i64) -> i64
87func fbxc_name_is(b: *u8, o: i64, n: i64, s: *u8) -> i64
98func fbxc_prop_size(b: *u8, p: i64) -> i64
117func fbxc_f64_fx(bits: i64) -> i64
142func fbxc_array(b: *u8, p: i64, elemsz: i64, out: *i64) -> i64
185func fbxc_f64_p20(bits: i64) -> i64
210func fbxc_unit_scale_micro(b: *u8, n: i64) -> i64