• 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.

Blender2FSX error messages

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Well wadda ya know. Cleaning up to conform to the naming convention at least got the model to compile. I'll plug away from here.

Kris, I am perfectly OK sharing my files with you. If you feel it is best to help me along offline, I am OK with that.

If you get to a point where you can not fix your problems, then you have the option to send me your Blender file. But I would suggest first try to export an object at a time and that will let you know where your problem is. Did you try to fist export a simple cube. And see if you can get that into FSX? The best thing to do is to start small and then work your way up.

The best practice that I have found when it comes to working on a project for FSX. Is to not wait until you have the whole project done before you try to export it and get it into FSX. Model and export as you go. That way you will save a lot of time trouble shooting.

Thanks, Kris
 
Messages
8
Country
us-utah
Maybe I am missing it, and I have tried to find, but is there some sort of explanation of how the scripts work in general, like a flow chart, short of reading every line? I have been trying to learn how to do this, have the blender2fsx tools, and installed. Been following the Youtube tutorials @krispy1001 put up. Unfortunately, I have had, for whatever reason, to edit some of the scripts to even get them to initialize because when I installed the Delux Edition and SDK I just purchased the paths and regedit keys were not the same. Then I am struggling to figure out why the scripts on export to direct x for fsx, it cannot find the blend.x.mdl file. I have programmed in my life, but never really in Python, and short of learning Python just to debug. I don't know. I am sure it is probably something I am doing. A little guidance would be very appreciated.

And on a similar note, does anyone plan on updating the blender2FSX tools to the new FSW SDK? I really was trying to learn this in prep for doing aircraft for FSW... But I will take any knowledge I can get.

Thanks guys. I really appreciate what you do, regardless of any mishaps I may cause. LOL


<edit> I just found the alpha version of the tools and am going to try that.
 
Last edited:
Messages
28
Country
france
Hello Kris and everybody, I'm an architecte and pilot, and I'm happy ti try Blend2fsx (Blender2FSXP3D (v0.9.4)-(ii)) with BLENDER 2.79b.

My blender file is PlatformTest09182016

Komma is defined to "." in my Windosw 10

I've FSX Acceleration and FSX Acceleration SDK with everything in the original path. No change.

I run BLENDER as Administrator

I have initiliased the toolset.

Sadly, I have this famous 347 or 349 error :

Blender2FSX v.0.9.4 Copyright (C) 2014-18 Felix Owono-Ateba Updated by Ron Haertel for Prepar3D updated by (1) Kris Pyatt (2017-up to version 0.9.3),(2)updated and modified by Manochvarma Raman (2018)(from version 0.9.4)
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:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\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 = sdk has not been registered yetEnvironment Kit\BGL Compiler SDK\BglComp.exe
Modeldef and XtoMDL root locations ..... sdk has not been registered yet
modeldef location ..... C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
XtoMDL location ..... sdk has not been registered yetEnvironment 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/P3D author(s), except by its use here.
*************************************************************
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 347, in Export
spawnv(P_WAIT, XToMdl, ['XToMdl.exe', '/XMLSAMPLE "%s"' % (Util.ReplaceFileNameExt(self.Config.filepath, '.x'))])
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\__init__.py", line 175, in execute
Exporter.Export()
File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 354, 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.



Have you any idea about that ?

I got only the .x file

Thanks for your attention !

Paul
 

Pyscen

Resource contributor
Messages
2,964
Country
us-texas
Hello...

Which version of FSX SDK was installed? What was the full path of the model you were trying to convert to a model?
 
Messages
1,233
Country
canada
That part of the program expects the folder locations to be in the registry. Perhaps your install of the SDK is not properly registered.


Code:
Modeldef and XtoMDL root locations ..... sdk has not been registered yet
modeldef location ..... C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml
XtoMDL location ..... sdk has not been registered yetEnvironment Kit\Modeling SDK\3DSM7\Plugins\XToMdl.exe
XToMdl.exe (C) Microsoft
 
Messages
28
Country
france
Hello Doug, here are the answers :
FSX version 10.0.6090
5
FSX Acceleration SDK version 10/0.61637.0

Paths :

C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK

For the model, I've put directly the blender file (platformTest.blend) in :

C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\scenery

It only creates me platformTest.x

I'm reinstalling now FSX and FSX Acceleration SDK with my original DVDs to (try to) get rid of this activation problem.
 
Messages
1,233
Country
canada
I suggest your work folders should outside of C:/Program Files(x86) or any other special windows folders. These are usually very secure and should not be used to update files from other programs.

Do you have another drive - say D: ? if not then create a C:/Projects folder and create/update your working files there and manually copy paste to
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\scenery
 

Pyscen

Resource contributor
Messages
2,964
Country
us-texas
Hello...

Along with what Ron said...

It appears you have 2 problems... the 1st problem is activating FSX (along with the SDK) - also... make sure you have the latest SDK. I suggest you look here in determining what version you need and installing it: https://www.fsdeveloper.com/wiki/index.php?title=SDK_Installation_(FSX)

The 2nd problem is in regards to what Ron was saying... working files should be outside the FSX file structure [specifically, outside the C:/Program Files(x86)] until they are in the proper format for FSX to use (ex. bgl and .mdl - depends on what you are modeling).
 
Messages
28
Country
france
Ok, Thanks to you 2,
I've reinstalled FSX, now I'm trying to activate it !!! Harshhhhh...
Ok for moving my test files out of the program disks and paths...
 
Messages
28
Country
france
Hello, I give up with FSX and its activation problems, too much for me. I've just bought PREPARD3D V4 !!! Very excited, the Spitfire (A2A) flights with Flyinside and my Occulus Rift were great. You'll have soon some news about Blend2fsx with Prepar3D, I hope good news !!! I hope the fsx addons will be all accepted. Thanks !!!
 
Messages
28
Country
france
Hello, no problem with P3D ! Thanks Ron and Doug ! I'm beginning to insert my projects into it with Blend2FSX, that's great ! Good job !
 

F747fly

Resource contributor
Messages
1,713
Country
netherlands
I found an issue while exporting with armatures. I figure I am simply missing something quite obvious, which is why I thought I would post it here and not open a whole new topic.

Code:
  File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\__init__.py", line 268, in execute
    Exporter.Export()
  File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 248, in Export
    Object.Write()
  File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 1063, in Write
    self.__WriteMesh(Mesh)
  File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 1191, in __WriteMesh
    self.__WriteMeshSkinWeights(Mesh, MeshEnumerator=MeshEnumerator)
  File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fsx\export_fsx.py", line 1672, in __WriteMeshSkinWeights
    PoseBoneNames = [Bone.name for Bone in ArmatureObject.pose.bones]
AttributeError: 'NoneType' object has no attribute 'pose'

location: <unknown location>:-1

Does anyone know what to do?
 
Messages
230
Country
ecuador
Hi,

There are three things to remember when exporting an armature:

  1. In FSX/P3D Materials Params of the mesh that moves with the armature, you must check "skinned mesh"
    BlenderParameter1.jpg


  2. The export parameters must also be completed :
    BlenderParameters2.jpg


  3. But before exporting, the armature must be "baked" by selecting all the elements of the armature in pose mode, which will remove the constraints and parental ties: ....:
    BlenderPoseMode.jpg
    BlenderBake.jpg


    Make a backup of the project with the unbaked armature so that it can be modified later on...!
Normally, with these elements, export should be carried out without any problems....
 

F747fly

Resource contributor
Messages
1,713
Country
netherlands
Thanks Chris, I tried this. I knew about the first 2 points but not about the 3rd one. Yet after trying this the issue keeps occuring, I must be missing something and I am think that either there is a part of the skinned materials not mapped to a vertex group OR there are some vertexes that are not part of any vertex group, but because my armature covers a number of objects (wing, slats, flaps, ailerons, etc.) I find it difficult to figure out which of the two is the case... I hoped I could find in the error if either of these issues are indeed occuring and if they do, which one.
 
Messages
41
Country
ca-novascotia
Sorry to revive an old thread, but I also have the "modeldef.xml not registered yet" problem. I am using the latest version of Blender and of Blender2FSXP3D. I have both P3D 4.5 and 5.1 installed on my D: drive, including both SDKs (all the most recent versions). SDKs appear to be working properly since I have several other programs that use it and work flawlessly. After reading this thread, the only reason why I should have this problem appears to be that I have to versions of P3D installed. Is that a reasonable guess?

Thanks,
Peter
 

Pyscen

Resource contributor
Messages
2,964
Country
us-texas
A couple of questions... when was the toolset installed and activated? Before or After the SDK was? Since there are multiple versions of Blender, which version is the latest to you? Is it the LTS 2.83.xx, 2.91 or beta 2.92? You say you are getting the same error as the original poster. Could you show the error that you are getting? It would help in refreshing memories of...
 
Last edited:
Messages
41
Country
ca-novascotia
Hello Doug,
many thanks for your quick reply. I am using Blender 2.91 and the SDK was installed before the toolset. The error message is attached below (with my home directory replaced by ".." because it contains my family name).

Cheers,
Peter

Python: Traceback (most recent call last):
File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Blender2P3DFSX\func_export.py", line 93, in __init__
self.modeldefTree = etree.parse(context.scene.fsx_modeldefpath)
File "D:\Programs\Blender\2.91\python\lib\xml\etree\ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "D:\Programs\Blender\2.91\python\lib\xml\etree\ElementTree.py", line 587, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'modeldef.xml has not been registered yet'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Blender2P3DFSX\ui_export.py", line 194, in execute
Exporter = FSXExporter(self, context,(bl_info.get("version"),))
File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Blender2P3DFSX\func_export.py", line 96, in __init__
raise FileNotFoundError("Modeldef.xml file not found")
FileNotFoundError: Modeldef.xml file not found

location: <unknown location>:-1

Python: Traceback (most recent call last):
File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Blender2P3DFSX\func_export.py", line 93, in __init__
self.modeldefTree = etree.parse(context.scene.fsx_modeldefpath)
File "D:\Programs\Blender\2.91\python\lib\xml\etree\ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "D:\Programs\Blender\2.91\python\lib\xml\etree\ElementTree.py", line 587, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'modeldef.xml has not been registered yet'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Blender2P3DFSX\ui_export.py", line 194, in execute
Exporter = FSXExporter(self, context,(bl_info.get("version"),))
File "C:\Users\..\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Blender2P3DFSX\func_export.py", line 96, in __init__
raise FileNotFoundError("Modeldef.xml file not found")
FileNotFoundError: Modeldef.xml file not found

location: <unknown location>:-1
 
Top