Start a new topic

FBX export using OpenFlight API

 Hi,


I am trying to use a Python script to export a large number of OpenFlight files to FBX format for use in Unity.

I have set the "Include External References" option to MG_TRUE in the parameters block but there are still no external references included in the fbx file.

If I use the export fbx functionality in Creator and check the Included External References option, the external references are included.

So, am I using the wrong spelling of the option or is this a known issue?

The relevant code is:

        db = mgOpenDb(self.inputFilename)
        if db == MG_NULL:
            raise ValueError("Failed to load \"{}\"".format(self.inputFilename))
        mgParam = mgGetParamBlockDbExporter ("D5637D1C-F499-4726-8CF9-333C68F68D8E")
        mgParamSetBool (mgParam, "Embed Textures", MG_TRUE)
        mgParamSetBool (mgParam, "Include External References", MG_TRUE)
        mgParamSetBool (mgParam, "Convert RGB Textures", MG_TRUE)
        mgParamSetString (mgParam, "LOD Export Option", "All LODs")
        mgParamSetString (mgParam, "Output Format", "Binary")
        mgParamSetString (mgParam, "Switch Export Option", "Export All Switches")
        mgExportDb (db, self.outputFilename, "D5637D1C-F499-4726-8CF9-333C68F68D8E", MG_NULL, mgParam)

Cheers,


-Tony



1 person has this problem
Login to post a comment