export empty dictionary. version 0.63.2

This commit is contained in:
ousttrue
2021-01-08 13:12:25 +09:00
parent d8d9ff481f
commit 797435f398
3 changed files with 11 additions and 7 deletions

View File

@@ -42,7 +42,11 @@ public static $0 $2(ListTreeNode<JsonValue> parsed)
public override string CreateSerializationCondition(string argName, JsonSchemaAttribute t)
{
return $"{argName}!=null&&{argName}.Count>0";
// return $"{argName}!=null&&{argName}.Count>0";
// this check is only /extensions/VRM/materialProperties/*
// should export empty dictionary.
return $"{argName}!=null";
}
public override void GenerateSerializer(StreamWriter writer, string callName)

View File

@@ -16,7 +16,7 @@ namespace VRM
get
{
return Path.Combine(UnityEngine.Application.dataPath,
"VRM/UniVRM/Scripts/Format/VRMSerializer.g.cs");
"VRM/Runtime/Format/VRMSerializer.g.cs");
}
}

View File

@@ -935,27 +935,27 @@ public static void Serialize_vrm_materialProperties_ITEM(JsonFormatter f, glTF_V
f.Value(value.renderQueue);
}
if(value.floatProperties!=null&&value.floatProperties.Count>0){
if(value.floatProperties!=null){
f.Key("floatProperties");
Serialize_vrm_materialProperties__floatProperties(f, value.floatProperties);
}
if(value.vectorProperties!=null&&value.vectorProperties.Count>0){
if(value.vectorProperties!=null){
f.Key("vectorProperties");
Serialize_vrm_materialProperties__vectorProperties(f, value.vectorProperties);
}
if(value.textureProperties!=null&&value.textureProperties.Count>0){
if(value.textureProperties!=null){
f.Key("textureProperties");
Serialize_vrm_materialProperties__textureProperties(f, value.textureProperties);
}
if(value.keywordMap!=null&&value.keywordMap.Count>0){
if(value.keywordMap!=null){
f.Key("keywordMap");
Serialize_vrm_materialProperties__keywordMap(f, value.keywordMap);
}
if(value.tagMap!=null&&value.tagMap.Count>0){
if(value.tagMap!=null){
f.Key("tagMap");
Serialize_vrm_materialProperties__tagMap(f, value.tagMap);
}