[3dsmax 2013- python] Using FBX exporter?

Hi,

Trying to run the FBX exporter with :


from Py3dsMax import mxs
mxs.pluginManager.loadClass FbxExporter 

But it always commit an error.

Finally also trying the example from the documentation :

mxs.FBXExporterSetParam "Cameras" False

…and also having an error, but if by chance I find a fix to the first issue, it should work.

All those function are running well using the maxscript Listener without the mxs.*

Finally, reading the documentation, there is nothing to setup the full path file to export?

From FBX maya, it uses to be pretty easy with the “-f” flag…

Any idea? :frowning:
Thanks…

Alright, just found one answer on the py3dsmax doc :

maxscript code

Sphere name:"MySphere"

In the Python Logger, I would type:

python code

 mxs.Sphere( name = "MySphere" )

Then :

mxs.FBXExporterSetParam "Cameras" False

should be :

mxs.FBXExporterSetParam("Cameras", False)

… :):

EDIT :

FInally :

mxs.pluginManager.loadClass FbxExporter

should be

mxs.pluginManager.loadClass(FbxExporter)

Sorry guys… I keep fighting with maxscript >> python…

Trying to do an export setting up the FBX options first and then to export without the settings pop up…

From the maxscript :

exportFile exportpathFull #noPrompt selectedOnly:true using:theClasses[8]

Then I tried a few conversion like the following :


fn = "C:\	est.fbx"
mxs.exportFile((fn), mxs.namify('noPrompt'), selectedOnly(False), using(exporterPlugin.classes[8]))

or

mxs.exportFile(fn)(mxs.namify(mxs.noPrompt)) (mxs.selectedOnly(False)) (msx.using(exporterPlugin.classes[8]))

But the FBX window always pop… :(:

Any idea?
Made a few research over google and the blur-dev wiki, but really nothing concerning the # conversion to python…
The only thing I found is the following here :

render renderType:#bakeSelected

Python :

mxs.render( renderType = mxs.namify( 'bakeSelected' ) ) 

Thanks for your help :tear:

Finally got an answer from python Blur team :

(fn is the fbx fullname)

mxs.exportFile(fn, mxs.pyhelper.namify( 'noPrompt' ), selectedOnly=True, using='FBXEXP' )