Page MenuHome

Lack of null record on Properties70 node by FBX Exporter
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Windows 10
Graphics card: Nvidia GTX 1070

Blender Version
Broken:
2.79 (unknown, already uninstalled)
2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: f6cb5f54494e
2.82 (sub 1), branch: master, commit date: 2019-11-20 21:25, hash: ba1e9ae4733a, type: Release
Worked:
None

Short description of error
Issue was discussed here: https://github.com/lo48576/fbxcel/issues/2

@lo48576 provides a good breakdown in the issue that I will snip here
In the attached fbx file below, the following is observed,

A node starting at offset 9662 has an error.
    Length info or actual data length of the node seems wrong.
The node is Properties70 node,
    which is the second child of NodeAttribute, which is the first child of Object, which is the ninth toplevel node.
 $ hexdump -C ~/temp/transient/cylinder_rig.fbx -s 9648 -n 80
 000025b0  46 6c 61 67 73 53 04 00  00 00 4e 75 6c 6c d7 25  |FlagsS....Null.%|
 000025c0  00 00 00 00 00 00 00 00  00 00 0c 50 72 6f 70 65  |...........Prope|
 000025d0  72 74 69 65 73 37 30 00  00 00 00 00 00 00 00 00  |rties70.........|
 000025e0  00 00 00 00 2f 2d 00 00  03 00 00 00 2d 00 00 00  |..../-......-...|
 000025f0  08 47 65 6f 6d 65 74 72  79 4c 9b 8c 66 00 00 00  |.GeometryL..f...|
 00002600


53 04 00 00 00 4e 75 6c 6c (S.....Null in the right column) seems to be an attribute value of the previous node.
S means string, 04 00 00 00 means the string is 4 bytes, and 4e 75 6c 6c (Null) is value.
(Flags before them is part of the node name, TypeFlags.)

Next of the attribute, from offset 9662 (0x25BE), a new node begins.
First 4 bytes d7 25 00 00 (= 0x25d7 = 9687) is end offset of the node.
Next 4 bytes 00 00 00 00 (= 0) is the number of node properties.
Next 4 bytes 00 00 00 00 (= 0) is the length of node properties in bytes.
Next 1 byte 0c (= 0x0C = 12) is the length of node name in bytes.
Next 12 bytes Properties70 is the node name.
At this point, offset of the next byte is 9687 (= 9662+4+4+4+1+12), so Properties70 ends here.

However, this is odd.
NULL record can be omitted only when (1) it has one or more node properties and (2) it has no children.
(This condition is same as the condition of braces can be omitted in FBX ASCII format.)
The Properties70 node here has no node properties, so it should have NULL record.

Next 13 bytes filled by 00 is a NULL record, but this seems to be not for Properties70, but for the parent node NodeAttribute (starting at offset 0x2557 and ends at offset 0x25E4).
And after the NULL record, the next node Geometry (which should be a sibling of NodeAttributes node) begins.

In conclusion, Properties70 (starting at offset 0x25BE) should have NULL record for it, but it has none.

Exact steps for others to reproduce the error
A simple cylinder with a rigged bone
https://github.com/andreasterrius/alers/blob/debug/fbx-loader/cylinder_rig.blend

This is the exported fbx from the above scene
https://github.com/andreasterrius/alers/blob/debug/fbx-loader/cylinder_rig.fbx

Details

Type
Bug