mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-20 01:37:59 -05:00
add sparse check box
This commit is contained in:
parent
1345972859
commit
7c9fb5ea1d
|
|
@ -19,11 +19,14 @@ namespace UniVRM10
|
|||
[Tooltip("Remove blendShapeClip that preset is Unknown")]
|
||||
public bool ReduceBlendshapeClip = false;
|
||||
|
||||
[Tooltip("Use sparse accessor for morph target")]
|
||||
public bool MorphTargetUseSparse = true;
|
||||
|
||||
public GltfExportSettings MeshExportSettings => new GltfExportSettings
|
||||
{
|
||||
UseSparseAccessorForMorphTarget = true,
|
||||
UseSparseAccessorForMorphTarget = MorphTargetUseSparse,
|
||||
ExportOnlyBlendShapePosition = true,
|
||||
DivideVertexBuffer = true,
|
||||
DivideVertexBuffer = true,
|
||||
};
|
||||
|
||||
public GameObject Root { get; set; }
|
||||
|
|
|
|||
|
|
@ -277,8 +277,11 @@ namespace UniVRM10
|
|||
model.ConvertCoordinate(VrmLib.Coordinates.Vrm1, ignoreVrm: false);
|
||||
|
||||
// export vrm-1.0
|
||||
var exporter = new UniVRM10.Vrm10Exporter(new EditorTextureSerializer(), new GltfExportSettings());
|
||||
var option = new VrmLib.ExportArgs();
|
||||
var exporter = new UniVRM10.Vrm10Exporter(new EditorTextureSerializer(), m_settings.MeshExportSettings);
|
||||
var option = new VrmLib.ExportArgs
|
||||
{
|
||||
sparse = m_settings.MorphTargetUseSparse,
|
||||
};
|
||||
exporter.Export(root, model, converter, option, Vrm ? Vrm.Meta : m_tmpObject.Meta);
|
||||
|
||||
var exportedBytes = exporter.Storage.ToGlbBytes();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user