Skip to content

Commit 8517ef7

Browse files
authored
Merge pull request #342 from AsoboStudio/update_to_blender_4_2
Update to blender 4 2
2 parents 3debd2a + 7165b1b commit 8517ef7

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

addons/io_scene_gltf2_msfs_2020/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"author": "Asobo Studio",
2525
"description": "This toolkit prepares your 3D assets to be used for Microsoft Flight Simulator 2020",
2626
"blender": (3, 3, 0),
27-
"version": (2, 3, 0),
27+
"version": (2, 3, 1),
2828
"location": "File > Import-Export",
2929
"category": "Import-Export",
3030
"tracker_url": "https://github.com/AsoboStudio/glTF-Blender-IO-MSFS-2020",

addons/io_scene_gltf2_msfs_2020/com/msfs_material_props.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,21 +1265,23 @@ def to_extension(blender_material, gltf2_material, export_settings):
12651265

12661266
result = {}
12671267
if blender_material.msfs_material_type not in ("msfs_sss", "msfs_hair"):
1268-
if blender_material.msfs_sss_color:
1269-
result["SSSColor"] = list(blender_material.msfs_sss_color)
1268+
return
1269+
1270+
if blender_material.msfs_sss_color:
1271+
result["SSSColor"] = list(blender_material.msfs_sss_color)
12701272

1271-
if blender_material.msfs_opacity_texture is not None:
1272-
result["opacityTexture"] = MSFS2020_Material_IO.export_image(
1273-
blender_material,
1274-
blender_material.msfs_opacity_texture,
1275-
"DEFAULT",
1276-
export_settings,
1277-
)
1273+
if blender_material.msfs_opacity_texture is not None:
1274+
result["opacityTexture"] = MSFS2020_Material_IO.export_image(
1275+
blender_material,
1276+
blender_material.msfs_opacity_texture,
1277+
"DEFAULT",
1278+
export_settings,
1279+
)
12781280

1279-
if result:
1280-
gltf2_material.extensions[AsoboSSS.SerializedName] = Extension(
1281-
name=AsoboSSS.SerializedName, extension=result, required=False
1282-
)
1281+
if result:
1282+
gltf2_material.extensions[AsoboSSS.SerializedName] = Extension(
1283+
name=AsoboSSS.SerializedName, extension=result, required=False
1284+
)
12831285

12841286

12851287
class AsoboAnisotropic:

0 commit comments

Comments
 (0)