Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Getting "Creator" field from FBX file
  RSS 2.0 ATOM  

Getting "Creator" field from FBX file
Rate this thread
 
49746
 
Permlink of this thread  
avatar
  • Location: Kaunas
  • Total Posts: 32
  • Joined: 11 December 2009 06:23 AM

Hi,

I have this file:

FBX 6.1.0 project file
Created by Blender FBX Exporter
; for support mailideasman42@gmail.com
; ----------------------------------------------------

FBXHeaderExtension:  {
    FBXHeaderVersion
1003
    FBXVersion
6100
    CreationTimeStamp
:  {
        Version
1000
        Year
2010
        Month
11
        Day
23
        Hour
10
        Minute
31
        Second
08
        Millisecond
0
    }
    Creator
"FBX SDK/FBX Plugins build 20070228"
    
OtherFlags:  {
        FlagPLE
0
    }
}
CreationTime
"2010-11-23 10:31:08:000"
Creator"Blender version 2.55 (sub 0)"

Object definitions
;------------------------------------------------------------------

...

There are two Creator fields (frist one “FBX SDK/FBX Plugins build 20070228”, second “Blender version 2.55 (sub 0)"). I know I can get the first one by doing:

importer.GetFileHeaderInfo()->mCreator

but I can’t figure out how to get the second one. Could you tell me how?

I’m using FBX SDK 2011.3.

Many thanks,
Paulius Liekis
Unity Technologies



Replies: 0
avatar

Hi Paulius,

The second Creator flag appeared in older versions of the FBX SDK. It is not used anymore, and ignored by the reader.

Viviane



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 1
/userdata/avatar/86x4dh6ek.jpg

Oh...I see. This makes latest FBX SDK incompatible with older FBX files, because I’m unable to read the information from the file.

I see three options:
1) Read current file with latest FBX SDK. This doesn’t work.
2) Insert “LastSaved|ApplicationName” and “LastSaved|ApplicationVersion” properties (with nesting sections) into current file. I tried that (just inserting these fields into text as experiment). It doesn’t work - latest FBX SDK just ignores these fields, because FBXVersion is 6100. Changing FBXVersion to 7100 allows me to read the file, but then I’m sure there will be problems with the rest of the file.
3) Write FBXVersion=7100 and add “LastSaved|ApplicationName” and “LastSaved|ApplicationVersion” properties. That would work, but it requires a lot of changes in Blender (and other software with the same issue) and I would still be unable to get the same information from older versions of Blender. So it’s not really an option either.

Is there another workaround?

Many thanks,
Paulius

Author: Paulius Liekis

Replied: 24 November 2010 12:10 AM  
avatar
  • TravF
  • Posted: 23 November 2010 08:08 AM

Have you looked at KFbxDocumentInfo?

//KFbxScene* pScene;
KFbxDocumentInfolpSceneInfo pScene->GetSceneInfo();
//lpSceneInfo->mAuthor

Probably different than mCreator, but shouldn’t writing apps save their info here instead?



Replies: 1
/userdata/avatar/86x4dh6ek.jpg

I’m aware of that structure and we’re using it.

Yes, other software can write that info, but there are problems (see my reply to Viviane’s post).

Author: Paulius Liekis

Replied: 24 November 2010 12:12 AM  
avatar
  • Liang.Ma
  • Posted: 27 November 2010 12:46 AM

Hi Paulius,

Here’s a minor reminder. The fbx files produced by Blender are not official FBX files in the sense that these files are not written by FBX SDK. Check their export source code. You will see what I mean.

http://projects.blender.org/plug...ot=bf-blender&view=markup

Since all these files are plain texts, you can always retrieve the creator name by “grep creator a.fbx”.

Cheers,
Liang



Replies: 1
/userdata/avatar/86x4dh6ek.jpg

Yes, I’m aware that these files are not written by FBX SDK, but that doesn’t make them invalid. Having Creator field outside of FBXHeaderExtension was part of the standard, see here:
http://download.autodesk.com/us/...6f.htm,topicNumber=d0e127

I know that I can parse it myself and I was considering it at some point. Thanks for the hint! but unfortunately reading same file twice has serious performance implications…

Author: Paulius Liekis

Replied: 27 November 2010 03:56 AM