From 9a2017c6f99fffef3eea20b051907adce3ce1c61 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Thu, 18 Feb 2021 20:07:22 +0900 Subject: [PATCH] =?UTF-8?q?schema=20=E3=81=8B=E3=82=89=E3=82=B7=E3=83=AA?= =?UTF-8?q?=E3=82=A2=E3=83=A9=E3=82=A4=E3=82=B6=E3=82=92=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Runtime/Format/SpringBone/Deserializer.g.cs | 15 ++++++++++----- .../VRM10/Runtime/Format/SpringBone/Format.g.cs | 13 ++++++++----- .../Runtime/Format/SpringBone/Serializer.g.cs | 15 ++++++++++----- Assets/VRM10/Runtime/Format/Vrm/Format.g.cs | 16 ++++++++-------- 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/Assets/VRM10/Runtime/Format/SpringBone/Deserializer.g.cs b/Assets/VRM10/Runtime/Format/SpringBone/Deserializer.g.cs index 0586970cf..3ebef6e81 100644 --- a/Assets/VRM10/Runtime/Format/SpringBone/Deserializer.g.cs +++ b/Assets/VRM10/Runtime/Format/SpringBone/Deserializer.g.cs @@ -73,6 +73,16 @@ public static Spring Deserialize_Springs_ITEM(JsonNode parsed) { var key = kv.Key.GetString(); + if(key=="extensions"){ + value.Extensions = new glTFExtensionImport(kv.Value); + continue; + } + + if(key=="extras"){ + value.Extras = new glTFExtensionImport(kv.Value); + continue; + } + if(key=="name"){ value.Name = kv.Value.GetString(); continue; @@ -150,11 +160,6 @@ public static SpringBoneJoint Deserialize_Joints_ITEM(JsonNode parsed) continue; } - if(key=="exclude"){ - value.Exclude = kv.Value.GetBoolean(); - continue; - } - } return value; } diff --git a/Assets/VRM10/Runtime/Format/SpringBone/Format.g.cs b/Assets/VRM10/Runtime/Format/SpringBone/Format.g.cs index 8febc816d..17405bf0e 100644 --- a/Assets/VRM10/Runtime/Format/SpringBone/Format.g.cs +++ b/Assets/VRM10/Runtime/Format/SpringBone/Format.g.cs @@ -32,20 +32,23 @@ namespace UniGLTF.Extensions.VRMC_springBone // Air resistance. Deceleration force. public float? DragForce; - - // When enabled, this joint will skip Spring processing. - public bool? Exclude; } public class Spring { + // Dictionary object with extension-specific objects. + public glTFExtension Extensions; + + // Application-specific data. + public glTFExtension Extras; + // Name of the Spring public string Name; - // Joints in this spring. Except for the first element, the parent of the element must be the previous element of the array + // Joints of the spring. Except for the first element, a previous joint of the array must be an ancestor of the joint. public List Joints; - // Colliders that detect collision with nodes start from springRoot + // Colliders that detect collision with this spring. public int[] Colliders; } diff --git a/Assets/VRM10/Runtime/Format/SpringBone/Serializer.g.cs b/Assets/VRM10/Runtime/Format/SpringBone/Serializer.g.cs index 8a87d1aef..c7b9fa404 100644 --- a/Assets/VRM10/Runtime/Format/SpringBone/Serializer.g.cs +++ b/Assets/VRM10/Runtime/Format/SpringBone/Serializer.g.cs @@ -68,6 +68,16 @@ public static void Serialize_Springs_ITEM(JsonFormatter f, Spring value) f.BeginMap(); + if(value.Extensions!=null){ + f.Key("extensions"); + value.Extensions.Serialize(f); + } + + if(value.Extras!=null){ + f.Key("extras"); + value.Extras.Serialize(f); + } + if(!string.IsNullOrEmpty(value.Name)){ f.Key("name"); f.Value(value.Name); @@ -143,11 +153,6 @@ public static void Serialize_Joints_ITEM(JsonFormatter f, SpringBoneJoint value) f.Value(value.DragForce.GetValueOrDefault()); } - if(value.Exclude.HasValue){ - f.Key("exclude"); - f.Value(value.Exclude.GetValueOrDefault()); - } - f.EndMap(); } diff --git a/Assets/VRM10/Runtime/Format/Vrm/Format.g.cs b/Assets/VRM10/Runtime/Format/Vrm/Format.g.cs index d2719fe49..039d50570 100644 --- a/Assets/VRM10/Runtime/Format/Vrm/Format.g.cs +++ b/Assets/VRM10/Runtime/Format/Vrm/Format.g.cs @@ -305,7 +305,7 @@ namespace UniGLTF.Extensions.VRMC_vrm public enum LookAtType { bone, - blendShape, + expression, } @@ -342,23 +342,23 @@ namespace UniGLTF.Extensions.VRMC_vrm public enum ExpressionPreset { custom, + happy, + angry, + sad, + relaxed, + surprised, aa, ih, ou, ee, oh, blink, - happy, - angry, - sad, - relaxed, + blinkLeft, + blinkRight, lookUp, - surprised, lookDown, lookLeft, lookRight, - blinkLeft, - blinkRight, neutral, }