From 797435f39876bdbb1bd8419e3d75c8a8a5920292 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 8 Jan 2021 13:12:25 +0900 Subject: [PATCH 1/2] export empty dictionary. version 0.63.2 --- .../Serialization/StringKeyDictionarySerialization.cs | 6 +++++- Assets/VRM/Editor/VRMSerializerGenerator.cs | 2 +- Assets/VRM/Runtime/Format/VRMSerializer.g.cs | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Assets/UniGLTF/Editor/UniGLTF/Serialization/StringKeyDictionarySerialization.cs b/Assets/UniGLTF/Editor/UniGLTF/Serialization/StringKeyDictionarySerialization.cs index e09987807..c102d0de2 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/Serialization/StringKeyDictionarySerialization.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/Serialization/StringKeyDictionarySerialization.cs @@ -42,7 +42,11 @@ public static $0 $2(ListTreeNode 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) diff --git a/Assets/VRM/Editor/VRMSerializerGenerator.cs b/Assets/VRM/Editor/VRMSerializerGenerator.cs index 75be56bc4..29e4e9733 100644 --- a/Assets/VRM/Editor/VRMSerializerGenerator.cs +++ b/Assets/VRM/Editor/VRMSerializerGenerator.cs @@ -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"); } } diff --git a/Assets/VRM/Runtime/Format/VRMSerializer.g.cs b/Assets/VRM/Runtime/Format/VRMSerializer.g.cs index ec49f1e3e..b603ebb48 100644 --- a/Assets/VRM/Runtime/Format/VRMSerializer.g.cs +++ b/Assets/VRM/Runtime/Format/VRMSerializer.g.cs @@ -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); } From 575f04e61aaecea89e528dcf38cb8da8e014b173 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 8 Jan 2021 13:12:44 +0900 Subject: [PATCH 2/2] version 0.63.2 --- Assets/UniGLTF/package.json | 2 +- Assets/VRM/Runtime/Format/VRMVersion.cs | 4 ++-- Assets/VRM/package.json | 4 ++-- Assets/VRMShaders/package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/UniGLTF/package.json b/Assets/UniGLTF/package.json index d0be6c177..b9a12e111 100644 --- a/Assets/UniGLTF/package.json +++ b/Assets/UniGLTF/package.json @@ -11,6 +11,6 @@ "name": "VRM Consortium" }, "dependencies": { - "com.vrmc.vrmshaders": "0.63.1" + "com.vrmc.vrmshaders": "0.63.2" } } \ No newline at end of file diff --git a/Assets/VRM/Runtime/Format/VRMVersion.cs b/Assets/VRM/Runtime/Format/VRMVersion.cs index a8411a7fb..ca8e7e76e 100644 --- a/Assets/VRM/Runtime/Format/VRMVersion.cs +++ b/Assets/VRM/Runtime/Format/VRMVersion.cs @@ -5,7 +5,7 @@ namespace VRM { public const int MAJOR = 0; public const int MINOR = 63; - public const int PATCH = 1; - public const string VERSION = "0.63.1"; + public const int PATCH = 2; + public const string VERSION = "0.63.2"; } } diff --git a/Assets/VRM/package.json b/Assets/VRM/package.json index 1c81b4476..15f3931aa 100644 --- a/Assets/VRM/package.json +++ b/Assets/VRM/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.univrm", - "version": "0.63.1", + "version": "0.63.2", "displayName": "VRM", "description": "VRM importer", "unity": "2018.4", @@ -14,7 +14,7 @@ "name": "VRM Consortium" }, "dependencies": { - "com.vrmc.vrmshaders": "0.63.1", + "com.vrmc.vrmshaders": "0.63.2", "com.vrmc.unigltf": "2.0.0" } } diff --git a/Assets/VRMShaders/package.json b/Assets/VRMShaders/package.json index 692738ce4..1136f7224 100644 --- a/Assets/VRMShaders/package.json +++ b/Assets/VRMShaders/package.json @@ -1,6 +1,6 @@ { "name": "com.vrmc.vrmshaders", - "version": "0.63.1", + "version": "0.63.2", "displayName": "VRM Shaders", "description": "VRM Shaders", "unity": "2018.4",