Maniphest T71729

Lack of null record on Properties70 node by FBX Exporter
Confirmed, NormalTO DO

Assigned To
None
Authored By
Andreas Terrius (andreasterrius)
Nov 21 2019, 2:45 PM
Tags
  • Import/Export
  • Add-ons (BF-Blender)
Subscribers
Andreas Terrius (andreasterrius)
Bastien Montagne (mont29)
Eitan Traurig (EitanSomething)

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

Related Objects

Mentioned In
T68575: FBX Known issues & TODO's
Mentioned Here
rBf6cb5f54494e: Version bump to 2.80 final release
rBba1e9ae4733a: Bevel: Custom Profile and CurveProfile Widget

Event Timeline

Andreas Terrius (andreasterrius) created this task.Nov 21 2019, 2:45 PM
Germano Cavalcante (mano-wii) edited projects, added Add-ons (Community), Import/Export; removed BF Blender.Nov 22 2019, 6:32 PM
Eitan Traurig (EitanSomething) changed the task status from Needs Triage to Needs Information from User.Apr 30 2020, 5:38 PM
Eitan Traurig (EitanSomething) added a subscriber: Eitan Traurig (EitanSomething).

Is this still an issue with 2.83?

Bastien Montagne (mont29) changed the subtype of this task from "Report" to "To Do".May 27 2020, 5:41 PM
Bastien Montagne (mont29) added a project: Python API.
Bastien Montagne (mont29) added a subscriber: Bastien Montagne (mont29).

To be investigated.

Bastien Montagne (mont29) mentioned this in T68575: FBX Known issues & TODO's.May 27 2020, 5:42 PM
Campbell Barton (campbellbarton) moved this task from Backlog to Under Discussion on the Python API board.Jun 18 2020, 3:12 PM
Campbell Barton (campbellbarton) removed a project: Python API.Jun 18 2020, 3:47 PM
Bastien Montagne (mont29) edited projects, added Add-ons (BF-Blender); removed Add-ons (Community).Jul 28 2020, 11:02 AM
Bastien Montagne (mont29) moved this task from Backlog to Long Term on the Add-ons (BF-Blender) board.Jul 28 2020, 11:08 AM
Aaron Carlisle (Blendify) changed the task status from Needs Information from User to Confirmed.Sep 22 2021, 8:13 PM