PreviewSceneManager.Bake IEnumerable

This commit is contained in:
ousttrue
2018-11-03 01:40:15 +09:00
parent 2b41df1d0b
commit f0064a2879
3 changed files with 9 additions and 11 deletions

View File

@@ -2,6 +2,8 @@
using UnityEngine;
using UnityEditorInternal;
using System;
using System.Linq;
using System.Collections.Generic;
namespace VRM
{
@@ -82,7 +84,7 @@ namespace VRM
/// <param name="values"></param>
/// <param name="materialValues"></param>
/// <param name="weight"></param>
protected void Bake(BlendShapeBinding[] values, MaterialValueBinding[] materialValues, float weight)
protected void Bake(IEnumerable<BlendShapeBinding> values, IEnumerable<MaterialValueBinding> materialValues, float weight)
{
if (m_scene != null)
{
@@ -93,7 +95,7 @@ namespace VRM
protected void Bake(BlendShapeClip clip, float weight)
{
Bake(clip.Values, clip.MaterialValues, weight);
Bake(Enumerable.Empty<BlendShapeBinding>(), Enumerable.Empty<MaterialValueBinding>(), weight);
}
protected virtual GameObject GetPrefab()

View File

@@ -153,7 +153,7 @@ namespace VRM
Materials = materials;
}
public void Bake(BlendShapeBinding[] values, float weight)
public void Bake(IEnumerable<BlendShapeBinding> values, float weight)
{
if (SkinnedMeshRenderer == null) return;

View File

@@ -207,7 +207,10 @@ namespace VRM
#if UNITY_EDITOR
Bounds m_bounds;
public void Bake(BlendShapeBinding[] values = null, MaterialValueBinding[] materialValues = null, float weight = 1.0f)
public void Bake(
IEnumerable<BlendShapeBinding> values = null,
IEnumerable<MaterialValueBinding> materialValues = null,
float weight = 1.0f)
{
//Debug.LogFormat("Bake");
m_bounds = default(Bounds);
@@ -251,13 +254,6 @@ namespace VRM
}
#endif
/*
int PreviewLayer
{
get;
set;
}
*/
/// <summary>
/// カメラパラメーターを決める