Skip to main content

FBX Exporter, Quo Vadis?!

I'm trying to script the 3D Studio Max intern FBX exporter. The Manual seems to be pretty straight forward. And also when i set and query various values of the exporter, everything seems fine. So i thought i'd be cool writing my own little toolchain around it, as the unit system in 3DSMax can surely be a major pain in the ass. Oh naive me, of course nothing ever works in 3DSMax as described for sure. Take a look:

units.SystemType

#centimeters

FBXExporterGetParam "ConvertUnit" 

#cm

exportFile fbxfile #noPrompt selectedOnly:true

true

Typing this, my object is exported with a scale of 100.0. Why? I don't know. Maybe the exporter assumes for some unknown reason that the scene system unit is meter? Well, lets put it to a test:

FBXExporterSetParam "ConvertUnit" "m"

OK

FBXExporterGetParam "ConvertUnit"

#m

exportFile fbxfile #noPrompt selectedOnly:true

true

FBXExporterGetParam "ConvertUnit"

#cm

Aha! Exporting the file resets the exporters settings to default even though stated otherwise in the manual:

Note: When you export or import files in MAXScript, use the command #noPrompt to prevent the FBX Exporter/Importer user interface from appearing during the process. For example:

ImportFile "C:\test.fbx" #noPrompt

If the UI appears before an export or import command executed through MAXScript, the last used preset is chosen, and effectively ignores any recent scripted changes.

Now this is simply brilliant! With other words i have no fucking influence on that exporter! Lets try a workaround:

units.SystemType

#centimeters

units.SystemType=#meters

#meters

units.SystemType

#meters

exportFile fbxfile #noPrompt selectedOnly:true

true

units.SystemType

#meters

That must do it, right? No. No change at all. Really? Not even the system units are influencing that thing?!

Final word: I solved it by just scaling the object down before exporting. This way it works. Dumbfuckstupid Autodesk shit, seriously.