using System;
using UniGLTF;
using UnityEngine;
namespace VRM
{
[Serializable]
public class VRMExportSettings : ScriptableObject
{
///
/// エクスポート時に強制的にT-Pose化する
///
[Tooltip("Option")]
public bool ForceTPose = false;
///
/// エクスポート時にヒエラルキーの正規化を実施する
///
[Tooltip("Require only first time")]
public bool PoseFreeze = true;
///
/// BlendShapeのシリアライズにSparseAccessorを使う
///
[Tooltip("Use sparse accessor for blendshape. This may reduce vrm size")]
public bool UseSparseAccessor = false;
///
/// BlendShapeのPositionのみをエクスポートする
///
[Tooltip("UniVRM-0.54 or later can load it. Otherwise fail to load")]
public bool OnlyBlendshapePosition = false;
///
/// エクスポート時にBlendShapeClipから参照されないBlendShapeを削除する
///
[Tooltip("Remove blendshape that is not used from BlendShapeClip")]
public bool ReduceBlendshape = false;
///
/// skip if BlendShapeClip.Preset == Unknown
///
[Tooltip("Remove blendShapeClip that preset is Unknown")]
public bool ReduceBlendshapeClip = false;
///
/// Export時に頂点バッファをsubmeshで分割する。GLTF互換性
///
[Tooltip("Divide vertex buffer. For more gltf compatibility")]
public bool DivideVertexBuffer = false;
///
/// Export時にVertexColorを落とさない。特別な用途で使えるように敢えて残す設定
///
[Tooltip("Keep vertex color attribute")]
public bool KeepVertexColor = false;
public GltfExportSettings MeshExportSettings => new GltfExportSettings
{
UseSparseAccessorForMorphTarget = UseSparseAccessor,
ExportOnlyBlendShapePosition = OnlyBlendshapePosition,
DivideVertexBuffer = DivideVertexBuffer,
KeepVertexColor = KeepVertexColor,
};
public GameObject Root { get; set; }
}
}