FBX import and export custom properties setting isn't work or isn't working correctly #104677

Open
opened 2023-06-06 22:35:12 +02:00 by Brad Clark · 7 comments
Member

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: Quadro RTX 3000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 528.95

Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3
Worked: Not sure when or if it worked I tested 3.4 and 4.0 alpha and 3.51 they all had the same problem

Short description of error
Export

  1. Armature custom properties to not export
  2. Pose bone custom properties will export to the FBX file but if they are animated, contain any animation.
  3. Objects with custom properties export but if animated do not contain animation.

Import

  1. Armature custom properties do not import as they do not export
  2. Pose bone properties do not import /get created and if they exist
  3. Object properties get created but if they are animated outside of blender, they do not animate

Exact steps for others to reproduce the error
Create an armature with a single bone
Go to pose mode and add a custom property on the bone and animate it.
Export it to FBX with custom properties turned on
Check it in Unity or any FBX tool that isn't Blender to see that the property exists and isn't animated.

Create a new file and import the fbx back in making sure custom properties are checked on in the import settings.
Select the bone and go to pose mode and see that there are no custom properties on the bone.

The test file has animated properties on the armature and a single bone in pose mode and a cube and all 3 have been animated.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: Quadro RTX 3000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 528.95 **Blender Version** Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: `e1ccd9d4a1d3` Worked: Not sure when or if it worked I tested 3.4 and 4.0 alpha and 3.51 they all had the same problem **Short description of error** Export 1. Armature custom properties to not export 2. Pose bone custom properties will export to the FBX file but if they are animated, contain any animation. 3. Objects with custom properties export but if animated do not contain animation. Import 1. Armature custom properties do not import as they do not export 2. Pose bone properties do not import /get created and if they exist 3. Object properties get created but if they are animated outside of blender, they do not animate **Exact steps for others to reproduce the error** Create an armature with a single bone Go to pose mode and add a custom property on the bone and animate it. Export it to FBX with custom properties turned on Check it in Unity or any FBX tool that isn't Blender to see that the property exists and isn't animated. Create a new file and import the fbx back in making sure custom properties are checked on in the import settings. Select the bone and go to pose mode and see that there are no custom properties on the bone. The test file has animated properties on the armature and a single bone in pose mode and a cube and all 3 have been animated.
Brad Clark added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-06-06 22:35:13 +02:00
Member

I recently had a look at custom properties due to a reported issue and noticed there were some gaps. Here's a rundown of the current support:

Imported custom properties:

  1. Mesh data
  2. Materials
  3. Images (should be supported, but I haven't tested it)
  4. Objects

Missing:

  1. Light data
  2. Camera data
  3. Bones
  4. Pose Bones
  5. Armature data

It would probably be a good idea to support importing the same custom properties that Blender is capable of exporting.


Exported custom properties:

  1. Light data
  2. Camera data
  3. Mesh data
  4. Materials
  5. Bones
  6. Pose Bones
  7. Objects

Missing:

  1. Armature data
  2. Images (I don't think Blender has any UI for managing custom properties of Images, so I'm not sure how useful this is beyond propagating imported custom properties)

It should be possible to export Armature data custom properties in the same way as Bone custom properties, whereby the custom properties are added to the FBX NodeAttribute (the Armature Object and Pose Bone custom properties are added to the FBX Node).


Supported imported property types:

  1. 3DS Max user properties
  2. Vector/Vector3D/Color/ColorRGB
  3. Vector4/ColorRGBA
  4. Vector2D
  5. Integer/int
  6. KString
  7. Number/double/Double
  8. Float/float
  9. Bool/bool
  10. Enum/enum

Missing:

  1. Byte
  2. UByte

There are also a number of unsupported types that can be found in fbx_utils.py in FBX_PROPERTIES_DEFINITIONS, but its unclear which can be used with custom properties.

I suspect there may be many other unsupported property types too.


The property types that Blender exports custom properties as are:

  1. int (Integer properties and Boolean properties)
  2. double (Float properties)
  3. Vector (Array properties with 3 elements)
  4. KString (All other properties)

Boolean properties could be changed to export with a bool property type and with the, I think fairly recent, addition of subtypes for custom properties, float-vector properties that have a color subtype could probably be exported as one of the Color property types.


Custom Property min/max values are neither imported nor exported. Single-value, numeric custom properties appear to support two extra values of the same type as the custom property that look like they are the min/max values of that property.
Edit: Upon further investigation, these extra values appear to only be available for animatable/animated properties.


For importing and exporting custom property animations I have no idea currently because I'm yet to understand much of the animations side of the FBX addon.

I recently had a look at custom properties due to a reported issue and noticed there were some gaps. Here's a rundown of the current support: Imported custom properties: 1. Mesh data 1. Materials 1. Images (should be supported, but I haven't tested it) 1. Objects Missing: 1. Light data 1. Camera data 1. Bones 1. Pose Bones 1. Armature data It would probably be a good idea to support importing the same custom properties that Blender is capable of exporting. --- Exported custom properties: 1. Light data 1. Camera data 1. Mesh data 1. Materials 1. Bones 1. Pose Bones 1. Objects Missing: 1. Armature data 1. Images (I don't think Blender has any UI for managing custom properties of Images, so I'm not sure how useful this is beyond propagating imported custom properties) It should be possible to export Armature data custom properties in the same way as Bone custom properties, whereby the custom properties are added to the FBX NodeAttribute (the Armature Object and Pose Bone custom properties are added to the FBX Node). --- Supported imported property types: 1. 3DS Max user properties 1. Vector/Vector3D/Color/ColorRGB 1. Vector4/ColorRGBA 1. Vector2D 1. Integer/int 1. KString 1. Number/double/Double 1. Float/float 1. Bool/bool 1. Enum/enum Missing: 1. Byte 1. UByte There are also a number of unsupported types that can be found in fbx_utils.py in `FBX_PROPERTIES_DEFINITIONS`, but its unclear which can be used with custom properties. I suspect there may be many other unsupported property types too. --- The property types that Blender exports custom properties as are: 1. int (Integer properties and Boolean properties) 1. double (Float properties) 1. Vector (Array properties with 3 elements) 1. KString (All other properties) Boolean properties could be changed to export with a bool property type and with the, I think fairly recent, addition of subtypes for custom properties, float-vector properties that have a color subtype could probably be exported as one of the Color property types. --- Custom Property min/max values are neither imported nor exported. Single-value, numeric custom properties appear to support two extra values of the same type as the custom property that look like they are the min/max values of that property. Edit: Upon further investigation, these extra values appear to only be available for animatable/animated properties. --- For importing and exporting custom property animations I have no idea currently because I'm yet to understand much of the animations side of the FBX addon.
Author
Member

Wow thank you for that information and the investigation, we should add it to the FBX addon docs that have custom properties entry as a ToDo with no information.

For animation and FBX I don't have a good answer but maybe you can look at what did for this addon and see if it helps you make sense of what needs to be done for animation support for the existing custom properties.

The fact that you can create and export but then not import them back through FBX or even their action is really a sneaky data Loss issue if you are trying to test and validate settings for a game characters etc... this has happened to me before but I didn't have to bring them back in at the time to Blender luckily but when I did to check I wondered why they weren't there....glad it is an actual missing thing instead of my mistake.

Wow thank you for that information and the investigation, we should add it to the FBX addon docs that have custom properties entry as a ToDo with no information. For animation and FBX I don't have a good answer but maybe you can look at what [](https://mosthostla.com/gamedev/ue4curves/) did for this addon and see if it helps you make sense of what needs to be done for animation support for the existing custom properties. The fact that you can create and export but then not import them back through FBX or even their action is really a sneaky data Loss issue if you are trying to test and validate settings for a game characters etc... this has happened to me before but I didn't have to bring them back in at the time to Blender luckily but when I did to check I wondered why they weren't there....glad it is an actual missing thing instead of my mistake.

Thank you both for bringing attention to these issues! Definitely a lot of room for improvement here in ways that will make Blender a much easier tool to integrate in broader DCC/Engine/Etc. pipelines.

To summarize a bit, it sounds like the main concerns, which are things I've also had trouble with, are:

  1. Not all properties that can be exported from Blender to FBX can be imported back in.
  2. "Custom" properties do seem to export to FBX consistently (verified by converting to ASCII with Autodesk's tools), but they do not ever export with their animation curves (if any).
  3. More type and sub-type coverage for "Custom" properties would be very valuable (such as booleans and colors).
Thank you both for bringing attention to these issues! Definitely a lot of room for improvement here in ways that will make Blender a _much_ easier tool to integrate in broader DCC/Engine/Etc. pipelines. To summarize a bit, it sounds like the _**main**_ concerns, which are things I've also had trouble with, are: 1. Not all properties that can be exported from Blender to FBX can be imported back in. 2. "Custom" properties do seem to export to FBX consistently (verified by converting to ASCII with Autodesk's tools), _but_ they do not ever export with their animation curves (if any). 3. More type and sub-type coverage for "Custom" properties would be very valuable (such as booleans and colors).

Yes I told them before #104543

Yes I told them before https://projects.blender.org/blender/blender-addons/issues/104543

Yes I told them before #104543

That's definitely not the same issue as this one.

> Yes I told them before https://projects.blender.org/blender/blender-addons/issues/104543 That's definitely not the same issue as this one.
Author
Member

Is anyone able to do some fixes and improvements on this?

Is anyone able to do some fixes and improvements on this?
Member

Unfortunately, I don't think there are any developers actively working on the FBX IO addon specifically, just myself doing bits and pieces in some of my spare time.

I've put together a first patch that makes all the exported custom properties also imported and vice versa.

Unfortunately, I don't think there are any developers actively working on the FBX IO addon specifically, just myself doing bits and pieces in some of my spare time. I've put together a first patch that makes all the exported custom properties also imported and vice versa.
Pratik Borhade added
Status
Confirmed
Module
Add-ons (BF-Blender)
and removed
Status
Needs Triage
labels 2023-08-10 10:47:07 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104677
No description provided.