AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / FBApplication().FileSave() TRIPLES file size!!!
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

FBApplication().FileSave() TRIPLES file size!!!
Rate this thread
 
9363
 
Permlink of this thread  
avatar
  • Geordie
  • Posted: 29 February 2008 09:45 PM
  • Total Posts: 10
  • Joined: 27 September 2007 02:32 AM

I have a binary FBX rig from maya.
the file is 1.6 meg.

If I open it in Mobu and the use the GUI to save it. it becomes 1.8 meg. not bad

if I use Python to save it as a binary, it TRIPLES in SiZE!!!! What the #U^*% is going on here?

If I type in

FBApplication().FileSave()

the file is 6.33 meg.

I have no idea how to keep this file size from exploding.
ideas?



Replies: 0
avatar
  • KxL
  • Posted: 01 March 2008 03:57 AM

Try using:

from pyfbsdk import FBFbxManager

saveMgr 
FBFbxManager()
saveMgr.SaveBegin'C:\\Test.fbx' )
saveMgr.SetOptionsFromHistory()
saveMgr.Save()
saveMgr.SaveEnd()

del(saveMgr)
del(FBFbxManager)

You can also set save options by yourself, or save them in file and reuse. Here I used last save options that you have in history file.

Cheers.



Replies: 0
avatar
  • mpigeon
  • Posted: 03 March 2008 07:42 AM

Hi Geordie,

Is it possible that you are saving in ASCII type? In that case it would be normal that your fbx get 3 times the size of the first one.

Also, take note that there`s a difference between the FBX exported from 3d apps, and the fbx saved in Mobu. The FBX exported is a sdk file format, and the one saved in Mobu is his native file format. In the fbx of Mobu, there`s a lot more info of stuff that cannot be understood by the FBX plugin.

Mart



Replies: 0
avatar
  • Geordie
  • Posted: 03 March 2008 12:40 PM

Binary to begin with. Binary afterward.

Try it yourself see if your file does the same thing.
This seems to work. It’s the embed option that seems to be defaulting to True:

from pyfbsdk import FBFbxManager

saveMgr 
FBFbxManager()
saveMgr.SaveBegin'C:\\Test.fbx' )
saveMgr.SetOptionsFromHistory()
# must turn off EmbedMedia
saveMgr.EmbedMedia False
saveMgr
.Save()
saveMgr.SaveEnd()

del(saveMgr)
del(FBFbxManager)


Replies: 0
avatar
  • mpigeon
  • Posted: 03 March 2008 01:26 PM

Seems to work with me.

If the embed was defaulting to True, it would be a good reason to triple the file size ; )



Replies: 0
avatar
  • KxL
  • Posted: 04 March 2008 04:04 AM

Geordie,

Can you check in <MB root folder>\bin\config in ???.Application.txt file this lines:

[SaveLoad]
EmbedMedias 
No
ConvertImageToTiff 
No
OneTakePerFile 
No
UseTakeName 
No

Maybe you have here enabled embeding, so when you disable it, your life could be easier ;)



Replies: 0
avatar
  • Geordie
  • Posted: 04 March 2008 12:30 PM

Holy cow.
That’s what it was.
the ???.Application.txt had EmbedMedias = Yes.

You rock KxL



Replies: 0