mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-10-02 07:42:25 -05:00
IsBinary read/write
This commit is contained in:
@@ -152,6 +152,7 @@ namespace VRM
|
||||
{
|
||||
asset.BlendShapeName = groupName;
|
||||
asset.Preset = EnumUtil.TryParseOrDefault<BlendShapePreset>(group.presetName);
|
||||
asset.IsBinary = group.isBinary;
|
||||
if (asset.Preset == BlendShapePreset.Unknown)
|
||||
{
|
||||
// fallback
|
||||
@@ -250,7 +251,7 @@ namespace VRM
|
||||
AvatarDescription = GLTF.extensions.VRM.humanoid.ToDescription(Nodes);
|
||||
AvatarDescription.name = "AvatarDescription";
|
||||
HumanoidAvatar = AvatarDescription.CreateAvatar(Root.transform);
|
||||
if(!HumanoidAvatar.isValid || !HumanoidAvatar.isHuman)
|
||||
if (!HumanoidAvatar.isValid || !HumanoidAvatar.isHuman)
|
||||
{
|
||||
throw new Exception("fail to create avatar");
|
||||
}
|
||||
@@ -289,7 +290,7 @@ namespace VRM
|
||||
meta.Title = gltfMeta.title;
|
||||
|
||||
var thumbnail = GetTexture(gltfMeta.texture);
|
||||
if (thumbnail!=null)
|
||||
if (thumbnail != null)
|
||||
{
|
||||
// ロード済み
|
||||
meta.Thumbnail = thumbnail.Texture;
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace VRM
|
||||
[JsonSchema(Description = "Expression name")]
|
||||
public string name;
|
||||
|
||||
[JsonSchema(Description = "Predefined Expression name", EnumValues =new object[] {
|
||||
[JsonSchema(Description = "Predefined Expression name", EnumValues = new object[] {
|
||||
"unknown",
|
||||
"neutral",
|
||||
"a",
|
||||
@@ -119,10 +119,14 @@ namespace VRM
|
||||
[JsonSchema(Description = "Material animation references.")]
|
||||
public List<glTF_VRM_MaterialValueBind> materialValues = new List<glTF_VRM_MaterialValueBind>();
|
||||
|
||||
[JsonSchema(Description = "0 or 1. Do not allow an intermediate value. Value should rounded")]
|
||||
public bool isBinary;
|
||||
|
||||
protected override void SerializeMembers(GLTFJsonFormatter f)
|
||||
{
|
||||
f.KeyValue(() => name);
|
||||
f.KeyValue(() => presetName);
|
||||
f.KeyValue(() => isBinary);
|
||||
f.KeyValue(() => binds);
|
||||
f.KeyValue(() => materialValues);
|
||||
}
|
||||
@@ -157,6 +161,7 @@ namespace VRM
|
||||
{
|
||||
name = clip.BlendShapeName,
|
||||
presetName = clip.Preset.ToString().ToLower(),
|
||||
isBinary = clip.IsBinary,
|
||||
binds = list,
|
||||
materialValues = materialList,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user