Skip to content

Commit d236661

Browse files
Allow numbered floats when serializing Material extras
- Fixes issue with YAB having 'infinity' assigned to sheen aperture for some materials.
1 parent 1f5b364 commit d236661

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Meddle/Meddle.Plugin/Models/Composer/MaterialSet.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Text;
55
using System.Text.Json;
66
using System.Text.Json.Nodes;
7+
using System.Text.Json.Serialization;
78
using Meddle.Plugin.Models.Composer.Materials;
89
using Meddle.Plugin.Models.Layout;
910
using Meddle.Plugin.Utils;
@@ -433,7 +434,8 @@ public MaterialSet(MtrlFile file, string mtrlPath, ShpkFile shpk, string shpkNam
433434

434435
public static JsonSerializerOptions JsonOptions => new()
435436
{
436-
IncludeFields = true
437+
IncludeFields = true,
438+
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals
437439
};
438440

439441
private MeddleMaterialBuilder GetMaterialBuilder(DataProvider dataProvider)

0 commit comments

Comments
 (0)