• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

(FSX) Modeldef : error

Messages
10
Country
france
Hello
In Blender 2.77 + Blender2FSXP3D_0903
"Manual Find ModelDel.xml" found manually
BUT export: errors (see attached image)
Why, please ?
Bonjour
Dans Blender 2.77 + Blender2FSXP3D_0903
"Manuel Find ModelDel.xml" trouvé manuellement
MAIS à l'exportation : erreurs (voir image jointe)
Pourquoi, s'il vous plaît?
171121062359849283.jpg
 
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! :)
 
The complex solution to my problem came to me in an epiphany last night just before I fell asleep! :idea:



... yes, it was as simple as changing "decimal separator" from "," to ".". :D

Don't know why I didn't think of that before, I do the "separator switch" routinely when using the SDK in other contexts. But now model creation from Blender works beautifully with both SDKs, and I'm very happy.
 
Last edited:
Back
Top