mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
@@ -284,6 +284,10 @@ namespace UniVRM10
|
||||
|
||||
public void ExportVrmExpression(ExpressionManager src, List<MeshGroup> _, List<Material> materials, List<Node> nodes)
|
||||
{
|
||||
if (Storage.gltfVrm.Expressions == null)
|
||||
{
|
||||
Storage.gltfVrm.Expressions = new List<UniGLTF.Extensions.VRMC_vrm.Expression>();
|
||||
}
|
||||
foreach (var x in src.ExpressionList)
|
||||
{
|
||||
Storage.gltfVrm.Expressions.Add(x.ToGltf(nodes, materials));
|
||||
|
||||
@@ -116,18 +116,25 @@ namespace UniVRM10
|
||||
OverrideLookAt = EnumUtil.Cast<UniGLTF.Extensions.VRMC_vrm.ExpressionOverrideType>(x.OverrideLookAt),
|
||||
OverrideMouth = EnumUtil.Cast<UniGLTF.Extensions.VRMC_vrm.ExpressionOverrideType>(x.OverrideMouth),
|
||||
};
|
||||
|
||||
g.MorphTargetBinds = new List<UniGLTF.Extensions.VRMC_vrm.MorphTargetBind>();
|
||||
foreach (var blendShapeBind in x.MorphTargetBinds)
|
||||
{
|
||||
g.MorphTargetBinds.Add(blendShapeBind.ToGltf(nodes));
|
||||
}
|
||||
|
||||
g.MaterialColorBinds = new List<UniGLTF.Extensions.VRMC_vrm.MaterialColorBind>();
|
||||
foreach (var materialColorBind in x.MaterialColorBinds)
|
||||
{
|
||||
g.MaterialColorBinds.Add(materialColorBind.ToGltf(materials));
|
||||
}
|
||||
|
||||
g.TextureTransformBinds = new List<UniGLTF.Extensions.VRMC_vrm.TextureTransformBind>();
|
||||
foreach (var materialUVBind in x.TextureTransformBinds)
|
||||
{
|
||||
g.TextureTransformBinds.Add(materialUVBind.ToGltf(materials));
|
||||
}
|
||||
|
||||
return g;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user