Blender2FSX After Blender 2.75a Crash (CLOSED)

krispy1001

Resource contributor
Hi Osian!

Ok, I went through your project and I did not have any problems getting it to export. So the errors that you are receiving are just on your system. I would install the latest version of Blender which is 2.78c and down load the latest version of the tool-set "Blender2FSX_088.zip".

I did fix several problems that you had with your TU-334 project. You need to go back and read the "procedure for new aircraft" in the SDK. You had your aircraft positioned incorrectly. You had your aircraft's nose pointing in the -Y axis. It needs to be pointing in the +Y axis. Also your aircraft objects were not at the correct scale. Remember you need to set all object scale to 1 after re-sizing them. You also need to follow the correct topology for your objects.

But besides those few issues, very nice modeling.

I have attached the corrected Blender file to this thread. You can download the file from this link: http://www.kp-coolstuff.com/downloads/tu-334_V2-5_Osian.zip

Thanks, Kris
 
Thanks Kris :)

The position of the aircraft and scale is something I always fix at the end of the development.
I am going to try the newer Blender and toolkit and see what happens.
I just don't understand why it did work half a year ago and suddenly it doesn't.

Anyway thanks for the help :)
 

krispy1001

Resource contributor
Hi Osian!

No, I do not understand why it would work and now it does not work for you. Sometimes you can solve these type of issues just by re-installing the software. By re-installing the software you update or correct any issues that may of been in your registry.

Thanks, Kris
 
Well I am back all updated to the new Blender and FSX toolset but I am still getting the error, and I am starting to get ready to give up honestly.

Any ideas left ?
EDIT: I think it looks like it can't find the XToMdl.exe but I don't know how to fix it

Thanks
e6d618ba34d712f7225903568c95f0ae.png
 
Last edited:
Ensure that you run the initialize part first. this reads the registry for the location of your SDK. Look in your registry for the location of the SDK and make sure it agrees with the real location. Other than that don't know what is wrong.

Your error says it can't find xtomdl.exe
 
Ok I now have reinstalled the SDK plus all it's surface packs and now it does export a model and it looks fine but I still get an error ?
b0dc3d4420e8b1e618b5d8a603604c1f.png
 

krispy1001

Resource contributor
Hi Osian!

What version of the tools-set are you running. It looks like you are using an old version that had the file name error!

Thanks, Kris
 
I don't think you have a version of the blender2fsx that has the fix to the changes to blender. You see your file has an extra x in the name before the mdl extension.

Your file should not be f-130_official_2.blend.x.mdl, what name do you give you mdl? what version of blender2fsx do you have? There was an update to blender2fsx and blender2p3d that should have fixed this issue.
 

krispy1001

Resource contributor
Hi Osian!

That error is telling you that XToMDL.exe returned an error. That is the same error you were getting before. Osian, start a new blender file just add a material to a simple cube. Give the cube a friendly name and a guide number make sure that your material is checked for FSX materials, See if you can export the simple cube without errors.

If you can not export the cube without errors, then I would think that you probably have a registry problem. If you understand your systems registry then using regedit go through your registry entries and find the path for your XToMDL.ede file. If you do not understand the registry then I would say your best bet would be to do a low-level format on your hard drive and completely re-install your operating system and all programs.

Thanks, Kris
 
Hi Osian!

That error is telling you that XToMDL.exe returned an error. That is the same error you were getting before. Osian, start a new blender file just add a material to a simple cube. Give the cube a friendly name and a guide number make sure that your material is checked for FSX materials, See if you can export the simple cube without errors.

If you can not export the cube without errors, then I would think that you probably have a registry problem. If you understand your systems registry then using regedit go through your registry entries and find the path for your XToMDL.ede file. If you do not understand the registry then I would say your best bet would be to do a low-level format on your hard drive and completely re-install your operating system and all programs.

Thanks, Kris
Ok I might have found the problem, I had in the export window the ''export selection,, box ticked, I don't know why but I just noticed it and I have unticked it .
Now I have done a few successful exports without errors
 
I am also getting this error. Before, I couldn't initialize the tool set. I had to edit the toolset source file to change the reference in the registry. It is now, for FSX at least: "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\microsoft games\Flight Simulator X SDK\SetupPath" not sdkrootdir or whatever. This is how it installed from the Deluxe edition I have. After editing the source to pull that reg value instead, it initialized fine. I created a box, gave it a simple diffuse material, then went to export to *.x. As long as I did not click on the export Mdl, it would export. Granted, I haven't figured out the material part yet. I am still watching and rewatching @krispy1001 's video tutorials. And after that, if I ran the XToMdl.exe from the command prompt, it would work fine! I think, cuz I don't know Python, that the problem lies in where the code thinks the XToMdl.exe is found. I have tried editing the paths in the fsx_export.py, but still get that message, different line number, but same problem. FYI I have the 093 version.

I want to thank @krispy1001 for all his hard work. The Blender2FSX tools are awesome. I am still learning it, but I hope to be able to utilize these tools more in the future.

Maybe, as you put a manual find for the Modeldef.xml, you could also somehow do the same for the other needed exe files? Just a thought. I don't know Python, or I probably would have done it myself. at least for me. LOL
 
I got the new version of the Blender2FSX tools from the link and got them into Blender. I don't know why, but for whatever reason, the REG key handle for my setup is not the same or something for all of you guys. I have to change the key name lookup from sdkrootdir to SetupPath in every version of the script I have tried so far. And then when initializing I have to go through and edit other areas of the code to get it to match as well. So, I am currently going through and editing the code again. I will try and let you know what I have to change to get it to work... if I can get it to work.
 
OK, so here is the first error after adding the addon to Blender:

To get this error resolved, I edited the script on line 200 and 201 to the following:
FSX_Toolset4FSX-P3D.py-----------------
200 (sdkdir,t)=QueryValueEx(handle, 'SdkRootdir') -----> (sdkdir,t)=QueryValueEx(handle, 'SetupPath')
201 bpy.context.scene.fsx_modeldefpath = ''.join([sdkdir,"Environment Kit\\Modeling SDK\\bin\\modeldef.xml"]) ---> bpy.context.scene.fsx_modeldefpath = ''.join([sdkdir,"SDK\\Environment Kit\\Modeling SDK\\3DSM7\\modeldef.xml"])

After these changes, this error went away, and the Toolset initialized.
 

Attachments

I then opened a new scene, deleted the camera and light, only leaving a cube. I added a material with nodes with just a diffuse shader and a color. When trying to export, if "Export MDL" is selected I get the following error:
 

Attachments

Top