First of all, thank you for the Blender toolkit, it rocks!
I got a problem that seems very similar.
Both P3DV4 and FSX SDKs are installed, in "C:\MFSX" and "C:\P3D4", respectively, as well as the 0.9.3 version of the toolkit.
For test purposes I use the simplest test object, with just the stock cube.
If I initialise the P3D toolkit and export, everything works splendidly, the model is created and works.
But if I initialise the FSX toolkit and do the same, export fails. The .X file is created nicely, but something goes wrong with the execution of XToMDL. To me, from trying to make sense of the logging, it almost seems like XToMDL is called twice, first time actually doing what it's supposed to do, but then one more time, where it displays the usage help.
Logs from P3D and FSX tests below.
P3D test:
Code:
Blender2FSX v.0.9.3 Copyright (C) 2014-16 Felix Owono-Ateba Updated by Ron Haertel for Prepar3D updated by Kris Pyatt
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see source files for details.
Using modeldef from .... C:\P3D4\SDK\Modeling\3ds Max\bin\modeldef.xml
Gathering scene objects information...: [####################] 100% DONE
Write all children and parents...: [####################] 100% DONE
Writing RootExportList...: [####################] 100% DONE
XtoMdl.exe path = C:\P3D4\SDK\Modeling\3ds Max\Common\Plugins\XToMdl.exe
bglComp path = C:\P3D4\SDK\World\Scenery\bglcomp.exe
Modeldef and XtoMDL root locations ..... C:\P3D4\SDK\
modeldef location ..... C:\P3D4\SDK\Modeling\3ds Max\bin\modeldef.xml
XtoMDL location ..... C:\P3D4\SDK\Modeling\3ds Max\Common\Plugins\XToMdl.exe
XToMdl.exe (C) Microsoft
The following output is generated by the tool XToMdl.exe.
This tool is provided with your FSX SDK and is in no way
related to Blender2FSX author(s), except by its use here.
*************************************************************
Found dictionary file: C:\P3D4\SDK\Modeling\3ds Max\bin\modeldef.xml
OutputFile: D:\Dokumenter\Blender\Test\hest.mdl
Output file after modification: D:\Dokumenter\Blender\Test\hest.mdl
Creating output MDL file: D:\Dokumenter\Blender\Test\hest.mdl
CRASHTREE no granularity specified
CRASHTREE completed in 00:00:00.0089996
******************** End of XToMdl.exe output ******************
FSX test:
Code:
Blender2FSX v.0.9.3 Copyright (C) 2014-16 Felix Owono-Ateba Updated by Ron Haertel for Prepar3D updated by Kris Pyatt
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see source files for details.
Using modeldef from .... C:\MFSX\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
Gathering scene objects information...: [####################] 100% DONE
Write all children and parents...: [####################] 100% DONE
Writing RootExportList...: [####################] 100% DONE
bglComp path = C:\MFSX\SDK\Environment Kit\BGL Compiler SDK\BglComp.exe
Modeldef and XtoMDL root locations ..... C:\MFSX\SDK\
modeldef location ..... C:\MFSX\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
XtoMDL location ..... C:\MFSX\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\XToMdl.exe
XToMdl.exe (C) Microsoft
The following output is generated by the tool XToMdl.exe.
This tool is provided with your FSX SDK and is in no way
related to Blender2FSX author(s), except by its use here.
*************************************************************
Found dictionary file: C:\MFSX\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
OutputFile: D:\Dokumenter\Blender\Test\hest.MDL
Output file after modification: D:\Dokumenter\Blender\Test\hest.MDL
Creating output MDL file: D:\Dokumenter\Blender\Test\hest.MDL
CRASHTREE no granularity specified
CRASHTREE completed in 00:00:00.0045000
Usage: XToMDL.exe /KEEP /NOGUI /BATCH /NOCRASH /BMP2DDS /XMLSAMPLE /XANIM /DICT:DictFileName /OUT:OutfileName Filename.X
Traceback (most recent call last):
File "C:\Users\Jens Peter Pedersen\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 341, in Export
assert getsize(Util.ReplaceFileNameExt(self.Config.filepath, '.MDL'))
AssertionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Jens Peter Pedersen\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\__init__.py", line 268, in execute
Exporter.Export()
File "C:\Users\Jens Peter Pedersen\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 353, in Export
raise ExportError("Export to .MDL failed. XToMdl.exe returned an error.")
io_scene_fsx.export_fsx.ExportError: Export to .MDL failed. XToMdl.exe returned an error.
location: <unknown location>:-1
location: <unknown location>:-1
In the FSX log there is some indication that the model is indeed created, and crashtree completed, right before the mysterious line "Usage: XToMDL.exe /KEEP /NOGUI ..." that appears just before the exception handling part.
I cannot make heads or tails of it, but I hope somebody with greater insight in the wonders of the toolkit can maybe help shed some light on this. I will be more than happy to provide additional info if needed!
