FBX import does not read custom bone properties #69554
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#69554
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
System Information
Operating system: Windows 10
Graphics card: Nvidia 1070 (8gb)
Blender Version
Broken: latest
Worked: Never?
Short description of error
Custom properties on the armature transform export and import fine, but on the bones they are ignored. I spoke with Bastien in blender.chat and he mentioned that this is a TODO that may have fallen through the cracks.
Exact steps for others to reproduce the error
Attempt to export this simple armature (attached), deform bones only, with custom properties. Import it back to see that the properties are not maintained.
export_test_01.blend
Added subscriber: @CharlesWardlaw
Added subscribers: @mont29, @mano-wii
@mont29, is this your area?
FBX import / export do not read or write custom bone propertiesto FBX import does not read custom bone propertiesBone props are exported, but importer currently ignores them, yes. Added the task to #68575 (FBX Known issues & TODO's), thanks.
Hi again,
Bone props are not exported, and I think I know why: it's exporting them from the bone and not the PoseBone. As any custom properties used in rigging would be on the PoseBone, it makes it look like nothing is flowing through.
I don't know what use exporting the actual bone properties is; in multiple years of production I haven't see anyone put data in that particular spot.
I ran a test by editing export_fbx_bin.py. I changed line 1517 from:
to:
And low and behold, the props are now exported. However, they're not exported in a place that other apps look for them, near as I can see.
I ran a reference export from Maya and I notice that the "custom" parameters are shoved in with the regular parameters under the node, while the Blender exporter puts them in a Properties70 underneath a NodeAttribute node. I think between the above code change and a slight reorganization of where this data is stored, the bug could be put to bed.
I also noticed that even when the posebone properties are used, the exporter does not look at the min and max values, which is important if they are present in the _RNA_UI.
Attached is a file comparing the reference FBX from Maya (left) and the one I exported from Blender (right), along with that test file.
blender_test_03.fbx
Lemme attach a reference Maya export too, while I'm at it.two_bone_params_2014.fbx
Thanks, will fix that exporting issue, it's rather trivial.
Hi there,
The fix you committed in
cb4e5b248c
only fixed half the problem. The other half is the props are being exported in the wrong node, as I indicated in the above image. So, the data isgetting written now, but the place where it is being written means that other applications don't pick it up.Is there a reason why those parameters are being stuck into the extra NodeAttribute chunks that do not appear when exporting from Maya?
Did you actually checked my commit? Now we export EDIT bone props in the attribute node (as expected), and POSE bone props in the model (aka 'object') node, that’s what was missing previously. Would not see any reason to write editbone props in the model, that would be only confusing… and would make separation between edit and pose ones impossible.
HI Bastien,
I did check your commit, but I'm not sure my image above was understood. Half of the problem was that the data was not getting exported, which it is now thanks to your patch. The other half of the problem is that the FBX file getting exported is malformed.
Please check the image I attached above.
The main issue is now that where the properties are landing in the FBX file is not recognized by other applications, regardless of how they're defined in Blender. The custom pose bone properties need to be showing up in the same property block as all the rest of the regular bone properties, as shown above.
I'm using a slightly modified version of this repo to introspect files:
https://github.com/nem0/OpenFBX
which is how I generated the above image and also am looking to see that data is actually getting exported.
The above file, two_bone_params_2014.fbx, should be used as a reference as it comes from Maya.
If you need any further examples of correct files, please let me know and I can send you anything you like from any version of Maya 2017-2019.
You are not addressing my points… again, new code in the FBX exporter puts pose props in the model FBX node, which afaik is the expected behavior…
If I export the example .blend above (F7718563), I get:
As you can see, all the
atoms
Pose custom props are in the Model FBX nodes…Only Edit bones custom props would now be put in the NodeAttribute FBX nodes (don't want to mix those with the Pose custom props on one hand, and on the other, afaik Edit bone custom props are not very commonly used…).
Ahh interesting. I think that I might not have had it installed correctly-- a clean build today and I'm seeing the attributes in the correct place! My apologies. But Maya is still not picking them up. [captain picard facepalm gif]
Something else I noticed: the tagging for the parameters is slightly different. At first I thought it is because the props I was exporting aren't integers, but I exported integers from Maya and they do come up differently. Attached are two more images. Could it be that the A+U tag (whatever that means) is what's causing Maya to not recognize the parameters properly?
I'm also attaching one more example file from Maya, a single joint with the six main property types on it, for reference.export_test_02_maya.fbx
Afaik,
A
tag means 'animated', andU
means 'user-defined data' (this is just assumptions from older FBX I analyzed during main development phase of the add-on, think there are no official info about those anywhere)…But yeah, maybe customprops all need that mysterious
A+U
set of tags, FBX has never ever been known for its consistency, so… Will try adding those and we'll see. Thanks for the investigation work, btw! ;)Hey, thank you for listening and helping out!
auto-parsing of commits in 2.81 branches is still not fully working it seems… Changed those 'flags' in
2476c0b4b2
(and merged it in master), so this should be testable in next daily build.Just pulled and rebuilt-- the properties are getting through!
Now that this is working in Maya I hope some folks chime in who might want to use it in another package (I hear some people use properties like these to send data into Unity).
Animation on the custom properties is not coming through yet.
As mentioned in the first part of this report the custom properties are not getting read back in if I import the FBX file I just exported. But this is awesome progress!
Added subscriber: @Kirchesch
UE4 can't import the Custom Properties, does not matter if they are in the edit or pose bones or in the armature level or in the armature object level
There is an Addon called "ue4curves" that does export Custom Properties on the Armature Object Level ("Object Properties" Tab instead of "Object Data" Tab)
But, the armature has to be called root, and any armature that is not called Armature will be imported into UE4 with an Extra Root Bone wich, because aparently UE4 reads the blender Armature Object as a Bone
I have read all the changes this Addon made to the importer and Here they are ("its not much")
At line 1967
At line 2006
At line 2043
At line 731
At line 741
He changed this part of your recent fix ( not recent but the one you did based on this post ) At line 586
To this
Maybe he knows something about the types, idk
I don't even know if it helps, but i need to export my custom properties directly to UE4, rn i can do it if i add my drivers to modify my Mesh Shape Keys, but then the animation files get too big and there is a hard cap of -10 and +10 to morph targets or shape keys i forgot blender's name, if you need any help or info i am here to help at any moment
Things i think are happening
Its late and i forgot my other assumptions, but if anything relevant (in my mind) commes up i will edit the post or create a new one
Added subscriber: @BClark
The UE custom properties stuff is still on my wish list to have fixed, first time finding someone who had posted on it as well.
*Well on everyone using Blender as their only dev tool for UE.