Dev Tutorial Changing the default Blender .x export options (1 Viewer)

Hi guys,

I thought I'd post this tutorial which shows how you can change the default export options in Blender. This can help you save time as you don't have to change the settings on each Blender session - it also means the objects is guaranteed to show correctly in OMSI (and not on its side!).

I have only tested this on Blender 2.79 so I am not sure whether this will work for 2.8.

Navigate to your Blender directory, then into 2.79\scripts\addons\io_scene_x then finally open the
Code:
__init__.py
file in your favourite text editor, however I recommend Notepad++.

1592137606381.png


You want to change the highlighted lines (53, 60 and 67) to the values in the screenshot (53 = True, 60 = 'RIGHT_HANDED', 67 = 'Z'). You can change line 53 to false if you always want to export all objects regardless of selection, however I prefer to keep this true. The other two lines change the export options to the "correct" co-ordinate and axis systems for OMSI usage. Save the file once finished.

Next time you go to export an object, you will see that the options have changed to what you chose in the file:
1592137791125.png


EDIT TO ADD: BKG left a helpful message for another export option:
Very useful feature this, that embarrassing exporting situation is something I've done enough times lol.

One more setting that might be useful for exporting to Omsi, is the apply modifiers checkbox. This allows you to apply modifiers on export, rather than having to apply them manually in the modifiers flyout. Saves a little bit of time and can also make things to edit in future.

Code can be found on line 113, and states default=False which can be changed to default=True as below to always check this box by default when exporting.

View attachment 68032

Hopefully this saves time for you in the future whilst developing!

- Kyle
 
Last edited:

Advertisement

BKG93

Member of Studio Polygon
Jan 2, 2019
109
602
London, United Kingdom
Pronouns
He/Him
Very useful feature this, that embarrassing exporting situation is something I've done enough times lol.

One more setting that might be useful for exporting to Omsi, is the apply modifiers checkbox. This allows you to apply modifiers on export, rather than having to apply them manually in the modifiers flyout. Saves a little bit of time and can also make things to edit in future.

Code can be found on line 113, and states default=False which can be changed to default=True as below to always check this box by default when exporting.

1592916823611.png
 
Oct 17, 2016
412
29
424
Very useful feature this, that embarrassing exporting situation is something I've done enough times lol.

One more setting that might be useful for exporting to Omsi, is the apply modifiers checkbox. This allows you to apply modifiers on export, rather than having to apply them manually in the modifiers flyout. Saves a little bit of time and can also make things to edit in future.

Code can be found on line 113, and states default=False which can be changed to default=True as below to always check this box by default when exporting.

View attachment 68032
Sweet, cheers. I've added this to the OP.
 
  • Like
Reactions: BKG93
This thread is more than 3 years old.

Your message may be considered spam for the following reasons:

Users who are viewing this thread