New feature: Add dynamic attributes to fbx export #35395

Closed
opened 2013-05-16 22:44:23 +02:00 by Jens Restemeier · 11 comments

%%%This adds an object's string, int and float dynamic attributes to an exported FBX file. This helps with game engines or other tools that can use additional information attached to objects during import.

  1. How to test it with Unity:
    Put the example script from http://docs.unity3d.com/Documentation/ScriptReference/AssetPostprocessor.OnPostprocessGameObjectWithUserProperties.html into a JavaScript file in the Editor folder.
    Create a Blender scene and add dynamic attributes to an object.
    During import you should see the dynamic attributes reported to the console.

  2. How to get a file to compare this against:
    If you have a license for 3DS Max you can follow the instructions from the answer at http://answers.unity3d.com/questions/218883/onpostprocessgameobjectwithuserproperties-user-pro.html . Export that scene as an Ascii FBX.

%%%

%%%This adds an object's string, int and float dynamic attributes to an exported FBX file. This helps with game engines or other tools that can use additional information attached to objects during import. 1) How to test it with Unity: Put the example script from http://docs.unity3d.com/Documentation/ScriptReference/AssetPostprocessor.OnPostprocessGameObjectWithUserProperties.html into a JavaScript file in the Editor folder. Create a Blender scene and add dynamic attributes to an object. During import you should see the dynamic attributes reported to the console. 2) How to get a file to compare this against: If you have a license for 3DS Max you can follow the instructions from the answer at http://answers.unity3d.com/questions/218883/onpostprocessgameobjectwithuserproperties-user-pro.html . Export that scene as an Ascii FBX. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%Committed r4535. with fix when writing quotes in a string '"' -> '"'%%%

%%%Committed r4535. with fix when writing quotes in a string '"' -> '"'%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Member

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Author
Member

I am missing this feature from Blender 2.69. Was there a problem with it or should I resubmit a patch against the new fbx exporter script?

I am missing this feature from Blender 2.69. Was there a problem with it or should I resubmit a patch against the new fbx exporter script?
Author
Member

export_fbx.patch New patch against Blender 2.69, including escaping for ampersand and quote. Example output:

			Property: "prop", "double", "U",1.000000
			Property: "prop1", "KString", "U",""string" & text"
			Property: "prop2", "int", "U",1
			Property: "prop3", "int", "U",0

This get picked up correctly by Unity3D.

(I assume escaping for ampersand is optional. My own code handles it, but I don't have a Max license to see which characters are escaped by default.)

[export_fbx.patch](https://archive.blender.org/developer/F78716/export_fbx.patch) New patch against Blender 2.69, including escaping for ampersand and quote. Example output: ``` Property: "prop", "double", "U",1.000000 Property: "prop1", "KString", "U",""string" & text" Property: "prop2", "int", "U",1 Property: "prop3", "int", "U",0 ``` This get picked up correctly by Unity3D. (I assume escaping for ampersand is optional. My own code handles it, but I don't have a Max license to see which characters are escaped by default.)

Added subscriber: @davepoo

Added subscriber: @davepoo

Is there any update for this - it's a required feature for anyone trying to export to game engines?
There is no support in Blender 2.71

Is there any update for this - it's a required feature for anyone trying to export to game engines? There is no support in Blender 2.71
Author
Member

This was added to the new binary FBX exporter. You'll have to either export your model manually or tweak the Unity export script to use the binary exporter.
I'm not sure if it is in the 2.71 release, but it is definitely in the current nightly build.

This was added to the new binary FBX exporter. You'll have to either export your model manually or tweak the Unity export script to use the binary exporter. I'm not sure if it is in the 2.71 release, but it is definitely in the current nightly build.
Campbell Barton removed their assignment 2015-02-26 11:45:34 +01:00
Bastien Montagne was assigned by Campbell Barton 2015-02-26 11:45:34 +01:00

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Eeeeh, this is in master since ages now, time to close!

Eeeeh, this is in master since ages now, time to close!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
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#35395
No description provided.