Fix FBX char type being interpreted as bool #104914
No reviewers
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#104914
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Mysteryem/blender-addons:fbx_fix_char_type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender has been interpreting the FBX 'C' type as bool, however, it is
actually an 8-bit integer that is separate from the already existing
byte/int8 type. FBX does have 'B' as a bool type, but it seems to be
unused.
FBX Converter displays what it calls "byte" ('Z' type) numerically,
but displays what it calls "int8" ('C' type) with both the numeric value
and the ascii character for that value, which leads me to believe that
this 'C' type should be interpreted as a single
char
. While theredoesn't appear to be many places that the 'C' type is used, it appears
to usually be set to a printable character.
Python doesn't have a
char
type, so the singlechar
is read andwritten as
bytes
with length equal to 1.There are no expected changes to the import or export of FBX files with
this patch because the only FBX element that was incorrectly being
exported as a bool is now exported as the '\x01' char, which has the
same raw value as the
True
value that was being exported before.The main benefit to this patch is that FBX files converted to .json with
fbx2json.py (and optionally back to .fbx with json2fbx.py) will now
maintain any 'C' type values instead of reducing them to True or False.
Additionally, should FBX files using the 'B' bool type be encountered in
the future, they are now supported.
The different types as seen in FBX Converter
Nice find... Gotta love the opacity of FBX specs :(