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

MSFS20 Problem using the new Asobo GltF exporter with Blender

perhaps Lagaffe might offer some additional insight for us here at FSDevloper (in English), as to what, if anything, we may do with the "Asobo" exporter and a designated numeric version of Blender
Hi Gary,

Currently, I works to finish my Canso project, that I started with Blender 2.83
Generally, as an old developer, I don't change tools during the course of a project : experience has shown me that this is the best way to waste time.
I have other projects in progress (Galloping Ghost, FW190 Replica, Savoia S-21, Dewoitine D-551, Twin Bonanza of J. Brel) and I think I will migrate them soon to the Asobo plugin and Blender 3.1.x

The big problem with Blender is that developers are not afraid to break their code to implement other functions that they think are essential.
- This is good because the product is evolving and not like FSX, P3D or MSFS which were still hanging around with old assumptions from the 2000s.
- It's not so good when it comes to keeping a plugin like Vitus alive over the years and versions, especially since since 2.79 there have been many new features and Blender is really coming of age.

I will try to post my feedback on the Asobo plugin here as soon as I "get my head above water" with my Canso.
Thanks to follow my posts on Pilote-virtuel where I try to anim a "Creators" section since 2008 :cool:
 
Blender 3.3.1.
glTF 1.1.6

Help!


bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.outliner.delete()
bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.outliner.delete()
bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.object.editmode_toggle()
bpy.ops.uv.smart_project()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.uv.smart_project()
bpy.context.space_data.context = 'MATERIAL'
bpy.context.object.active_material.msfs_material_type = 'NONE'
bpy.context.object.active_material.msfs_material_type = 'msfs_standard'
bpy.context.space_data.system_folders_active = 4
bpy.context.space_data.system_folders_active = 4
bpy.ops.image.open(filepath="H:\\Textures\\Bricks051_2k\\Bricks051_2K_Color.png", directory="H:\\Textures\\Bricks051_2k\\", files=[{"name":"Bricks051_2K_Color.png", "name":"Bricks051_2K_Color.png"}], relative_path=True, show_multiview=False)
bpy.ops.transform.resize(value=(2.96283, 2.96283, 2.96283), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=False, use_snap_edit=False, use_snap_nonedit=False, use_snap_selectable=False)
bpy.context.space_data.shading.type = 'MATERIAL'
bpy.context.scene.msfs_multi_exporter_settings.export_texture_dir = "../teture"
bpy.context.scene.msfs_multi_exporter_lod_groups[0].generate_xml = True
bpy.context.scene.msfs_multi_exporter_lod_groups[0].lods[0].enabled = True
bpy.context.space_data.system_folders_active = 4
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\addons\io_scene_gltf2_msfs\io\msfs_multi_export.py", line 171, in execute
MSFS_OT_MultiExportGLTF2.export(
File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\addons\io_scene_gltf2_msfs\io\msfs_multi_export.py", line 45, in export
bpy.ops.export_scene.gltf(
File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py", line 113, in __call__
ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "export_displacement" unrecognized
 
Blender 3.3.1.
glTF 1.1.6

Help!


bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.outliner.delete()
bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.outliner.delete()
bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.outliner.item_activate(deselect_all=True)
bpy.ops.object.editmode_toggle()
bpy.ops.uv.smart_project()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.uv.smart_project()
bpy.context.space_data.context = 'MATERIAL'
bpy.context.object.active_material.msfs_material_type = 'NONE'
bpy.context.object.active_material.msfs_material_type = 'msfs_standard'
bpy.context.space_data.system_folders_active = 4
bpy.context.space_data.system_folders_active = 4
bpy.ops.image.open(filepath="H:\\Textures\\Bricks051_2k\\Bricks051_2K_Color.png", directory="H:\\Textures\\Bricks051_2k\\", files=[{"name":"Bricks051_2K_Color.png", "name":"Bricks051_2K_Color.png"}], relative_path=True, show_multiview=False)
bpy.ops.transform.resize(value=(2.96283, 2.96283, 2.96283), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=False, use_snap_edit=False, use_snap_nonedit=False, use_snap_selectable=False)
bpy.context.space_data.shading.type = 'MATERIAL'
bpy.context.scene.msfs_multi_exporter_settings.export_texture_dir = "../teture"
bpy.context.scene.msfs_multi_exporter_lod_groups[0].generate_xml = True
bpy.context.scene.msfs_multi_exporter_lod_groups[0].lods[0].enabled = True
bpy.context.space_data.system_folders_active = 4
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\addons\io_scene_gltf2_msfs\io\msfs_multi_export.py", line 171, in execute
MSFS_OT_MultiExportGLTF2.export(
File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\addons\io_scene_gltf2_msfs\io\msfs_multi_export.py", line 45, in export
bpy.ops.export_scene.gltf(
File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py", line 113, in __call__
ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "export_displacement" unrecognized
Use 3.1 and will work.
 
Is there an import or a from required to be able to add msfs materials?

I've tried this method using the data logged as one does things manually, but it doesn't even name the Material. I have tried easybpy to create and name the material, which works, but then the attempt to set the material type
to msfs_standard is ignored. Currently no error message, though I have seen a past message indicating the type doesn't exist. I am new to Python, so my understanding of structure is very limited.

#Try to automatically create the material
bpy.ops.object.material_slot_add()
bpy.ops.material.new()
bpy.context.object.active_material.name = m_text

bpy.context.object.active_material.msfs_material_type = 'msfs_standard'


bpy.ops.image.open(filepath="//"+newFileName, directory=newTextureDirectory, files=[{"name":newFileName}], show_multiview=False)

The Error resulting is:

Python: Traceback (most recent call last):
File "g:\Users\Martin\Documents\Airport Projects\KMSP\GroundMarkings\Exp.blend\DrawTemplate", line 30, in execute
File "g:\Users\Martin\Documents\Airport Projects\KMSP\GroundMarkings\Exp.blend\DrawTemplate", line 77, in main_code
AttributeError: 'NoneType' object has no attribute 'name'
 
Back
Top