mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
107 lines
3.1 KiB
C#
107 lines
3.1 KiB
C#
// <auto-generated />
|
|
//
|
|
// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
|
|
//
|
|
// using FModel.RenderMat;
|
|
//
|
|
// var renderSwitchMaterial = RenderSwitchMaterial.FromJson(jsonString);
|
|
|
|
namespace FModel.RenderMat
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
using System.Globalization;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
public partial class RenderSwitchMaterial
|
|
{
|
|
[JsonProperty("export_type")]
|
|
public string ExportType { get; set; }
|
|
|
|
[JsonProperty("Parent")]
|
|
public string Parent { get; set; }
|
|
|
|
[JsonProperty("ScalarParameterValues")]
|
|
public ScalarParameterValue[] ScalarParameterValues { get; set; }
|
|
|
|
[JsonProperty("TextureParameterValues")]
|
|
public TextureParameterValue[] TextureParameterValues { get; set; }
|
|
|
|
[JsonProperty("BasePropertyOverrides")]
|
|
public BasePropertyOverrides BasePropertyOverrides { get; set; }
|
|
}
|
|
|
|
public partial class BasePropertyOverrides
|
|
{
|
|
[JsonProperty("BlendMode")]
|
|
public string BlendMode { get; set; }
|
|
|
|
[JsonProperty("ShadingModel")]
|
|
public string ShadingModel { get; set; }
|
|
|
|
[JsonProperty("OpacityMaskClipValue")]
|
|
public double OpacityMaskClipValue { get; set; }
|
|
}
|
|
|
|
public partial class ScalarParameterValue
|
|
{
|
|
[JsonProperty("ParameterInfo")]
|
|
public ParameterInfo ParameterInfo { get; set; }
|
|
|
|
[JsonProperty("ParameterValue")]
|
|
public long ParameterValue { get; set; }
|
|
|
|
[JsonProperty("ExpressionGUID")]
|
|
public string ExpressionGuid { get; set; }
|
|
}
|
|
|
|
public partial class ParameterInfo
|
|
{
|
|
[JsonProperty("Name")]
|
|
public string Name { get; set; }
|
|
|
|
[JsonProperty("Association")]
|
|
public string Association { get; set; }
|
|
|
|
[JsonProperty("Index")]
|
|
public long Index { get; set; }
|
|
}
|
|
|
|
public partial class TextureParameterValue
|
|
{
|
|
[JsonProperty("ParameterInfo")]
|
|
public ParameterInfo ParameterInfo { get; set; }
|
|
|
|
[JsonProperty("ParameterValue")]
|
|
public string ParameterValue { get; set; }
|
|
|
|
[JsonProperty("ExpressionGUID")]
|
|
public string ExpressionGuid { get; set; }
|
|
}
|
|
|
|
public partial class RenderSwitchMaterial
|
|
{
|
|
public static RenderSwitchMaterial[] FromJson(string json) => JsonConvert.DeserializeObject<RenderSwitchMaterial[]>(json, FModel.RenderMat.Converter.Settings);
|
|
}
|
|
|
|
public static class Serialize
|
|
{
|
|
public static string ToJson(this RenderSwitchMaterial[] self) => JsonConvert.SerializeObject(self, FModel.RenderMat.Converter.Settings);
|
|
}
|
|
|
|
internal static class Converter
|
|
{
|
|
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
|
|
{
|
|
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
|
|
DateParseHandling = DateParseHandling.None,
|
|
Converters =
|
|
{
|
|
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
|
|
},
|
|
};
|
|
}
|
|
}
|