mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-10 04:49:28 -05:00
未使用コード、コメント削除
This commit is contained in:
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
namespace VRM
|
||||
{
|
||||
[Serializable]
|
||||
[Serializable]
|
||||
public struct BlendShapeBinding : IEquatable<BlendShapeBinding>
|
||||
{
|
||||
public String RelativePath;
|
||||
@@ -103,50 +103,6 @@ namespace VRM
|
||||
return m_prefab;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply BlendShape for Preview
|
||||
/// </summary>
|
||||
/// <param name="root"></param>
|
||||
/// <param name="value"></param>
|
||||
public void Apply(Transform root, float value)
|
||||
{
|
||||
if (Values != null)
|
||||
{
|
||||
foreach (var x in Values)
|
||||
{
|
||||
var target = root.Find(x.RelativePath);
|
||||
if (target != null)
|
||||
{
|
||||
var sr = target.GetComponent<SkinnedMeshRenderer>();
|
||||
if (sr != null)
|
||||
{
|
||||
sr.SetBlendShapeWeight(x.Index, x.Weight * value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (MaterialValues != null)
|
||||
{
|
||||
foreach (var x in MaterialValues)
|
||||
{
|
||||
var target = root.Find(x.RelativePath);
|
||||
if (target != null)
|
||||
{
|
||||
var sr = target.GetComponent<SkinnedMeshRenderer>();
|
||||
if (sr != null)
|
||||
{
|
||||
var m = sr.sharedMaterials[x.Index];
|
||||
var color = x.BaseValue + (x.TargetValue - x.BaseValue) * value;
|
||||
m.SetColor(x.ValueName, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
@@ -180,8 +136,5 @@ namespace VRM
|
||||
/// </summary>
|
||||
[SerializeField]
|
||||
public bool IsBinary;
|
||||
|
||||
// [SerializeField]
|
||||
// public Texture2D Thumbnail;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user