mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-14 06:50:19 -05:00
GltfExportSettings.AnimationExporter to gltfExporter argument
This commit is contained in:
@@ -103,10 +103,10 @@ namespace UniGLTF
|
||||
EditorUtility.DisplayProgressBar("export gltf", path, progress);
|
||||
try
|
||||
{
|
||||
|
||||
var data = new ExportingGltfData();
|
||||
Settings.AnimationExporter = new EditorAnimationExporter();
|
||||
using (var exporter = new gltfExporter(data, Settings, new EditorProgress()))
|
||||
using (var exporter = new gltfExporter(data, Settings,
|
||||
progress: new EditorProgress(),
|
||||
animationExporter: new EditorAnimationExporter()))
|
||||
{
|
||||
exporter.Prepare(State.ExportRoot);
|
||||
exporter.Export(new EditorTextureSerializer());
|
||||
|
||||
@@ -45,7 +45,5 @@ namespace UniGLTF
|
||||
/// Keep VertexColor
|
||||
/// </summary>
|
||||
public bool KeepVertexColor;
|
||||
|
||||
public IAnimationExporter AnimationExporter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,10 @@ namespace UniGLTF
|
||||
m_progress.Report(new ExportProgress("gltfExporter", msg, progress));
|
||||
}
|
||||
|
||||
public gltfExporter(ExportingGltfData data, GltfExportSettings settings, IProgress<ExportProgress> progress = null)
|
||||
IAnimationExporter m_animationExporter;
|
||||
|
||||
public gltfExporter(ExportingGltfData data, GltfExportSettings settings, IProgress<ExportProgress> progress = null,
|
||||
IAnimationExporter animationExporter = null)
|
||||
{
|
||||
_data = data;
|
||||
|
||||
@@ -97,6 +100,8 @@ namespace UniGLTF
|
||||
// default
|
||||
m_settings = new GltfExportSettings();
|
||||
}
|
||||
|
||||
m_animationExporter = animationExporter;
|
||||
}
|
||||
|
||||
GameObject m_tmpParent = null;
|
||||
@@ -328,10 +333,10 @@ namespace UniGLTF
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (m_settings.AnimationExporter != null)
|
||||
if (m_animationExporter != null)
|
||||
{
|
||||
ReportProgress("Animations", 0.9f);
|
||||
m_settings.AnimationExporter.Export(_data, Copy, Nodes);
|
||||
m_animationExporter.Export(_data, Copy, Nodes);
|
||||
}
|
||||
|
||||
ExportExtensions(textureSerializer);
|
||||
|
||||
Reference in New Issue
Block a user