nx_fbx_core.nx
buildroot/runtime/nx_fbx_core.nx
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
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
| 18 | const FBXC_MAXOUT: i64 = 134217728 |
| 20 | const FBXC_END: i64 = 0 |
| 21 | const FBXC_NPROPS: i64 = 1 |
| 22 | const FBXC_PLEN: i64 = 2 |
| 23 | const FBXC_NAMELEN: i64 = 3 |
| 24 | const FBXC_NAMEOFF: i64 = 4 |
| 25 | const FBXC_PROPSOFF: i64 = 5 |
| 26 | const FBXC_HDRSZ: i64 = 6 |
| 27 | const FBXC_OUTN: i64 = 7 |
| 178 | const FBXC_MICRO: i64 = 1000000 |
| 179 | const FBXC_P20: i64 = 1048576 |
| 180 | const FBXC_TOPOFF: i64 = 27 |
functions
| 29 | func fbxc_u32(b: *u8, o: i64) -> i64 |
| 32 | func fbxc_u64(b: *u8, o: i64) -> i64 { return fbxc_u32(b, o) | (fbxc_u32(b, o + 4) << 32) } |
| 33 | func fbxc_i32(b: *u8, o: i64) -> i64 |
| 38 | func fbxc_i64le(b: *u8, o: i64) -> i64 |
| 45 | func fbxc_version(b: *u8, n: i64) -> i64 |
| 53 | func fbxc_big(ver: i64) -> i64 { if ver >= 7500 { return 1 } return 0 } |
| 57 | func fbxc_hdr(b: *u8, n: i64, pos: i64, big: i64, out: *i64) -> i64 called by 7: fbb_nodefbb_nodefbb_nodefbxc_unit_scale_microfbx_walkfp_scene_walk+1 calls 2: fbxc_u64fbxc_u32 |
| 87 | func fbxc_name_is(b: *u8, o: i64, n: i64, s: *u8) -> i64 |
| 98 | func fbxc_prop_size(b: *u8, p: i64) -> i64 |
| 117 | func fbxc_f64_fx(bits: i64) -> i64 |
| 142 | func fbxc_array(b: *u8, p: i64, elemsz: i64, out: *i64) -> i64 called by 9: af_linearaf_curvesfbb_matrixfbb_matrixfbb_matrixfbx_walk+3 calls 2: fbxc_u32nx_deflate_inflate |
| 185 | func fbxc_f64_p20(bits: i64) -> i64 |
| 210 | func fbxc_unit_scale_micro(b: *u8, n: i64) -> i64 |