mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
Revert "fixed BlendShapeAvatar.Clips not to contain null"
This reverts commit ef06850e17.
This commit is contained in:
@@ -4,7 +4,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using UniGLTF;
|
||||
using System.IO;
|
||||
using UnityEngine.Serialization;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -14,34 +13,23 @@ namespace VRM
|
||||
[CreateAssetMenu(menuName = "VRM/BlendShapeAvatar")]
|
||||
public class BlendShapeAvatar : ScriptableObject
|
||||
{
|
||||
[FormerlySerializedAs("Clips")]
|
||||
[SerializeField]
|
||||
private List<BlendShapeClip> clips = new List<BlendShapeClip>();
|
||||
|
||||
public List<BlendShapeClip> Clips
|
||||
{
|
||||
get
|
||||
{
|
||||
RemoveNullClip();
|
||||
return clips;
|
||||
}
|
||||
set => clips = value;
|
||||
}
|
||||
public List<BlendShapeClip> Clips = new List<BlendShapeClip>();
|
||||
|
||||
/// <summary>
|
||||
/// NullのClipを削除して詰める
|
||||
/// </summary>
|
||||
public void RemoveNullClip()
|
||||
{
|
||||
if (clips == null)
|
||||
if (Clips == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (int i = clips.Count - 1; i >= 0; --i)
|
||||
for (int i = Clips.Count - 1; i >= 0; --i)
|
||||
{
|
||||
if (clips[i] == null)
|
||||
if (Clips[i] == null)
|
||||
{
|
||||
clips.RemoveAt(i);
|
||||
Clips.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user