mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-22 02:24:57 -05:00
VRM 0.x の仕様に反する変換 Export は throw する
This commit is contained in:
@@ -10,6 +10,8 @@ namespace VRM
|
||||
{
|
||||
public class VRMExporter : gltfExporter
|
||||
{
|
||||
public const Axes VrmSpecificationInverseAxis = Axes.Z;
|
||||
|
||||
protected override IMaterialExporter CreateMaterialExporter()
|
||||
{
|
||||
return new VRMMaterialExporter();
|
||||
@@ -30,6 +32,11 @@ namespace VRM
|
||||
|
||||
public VRMExporter(glTF gltf, GltfExportSettings exportSettings) : base(gltf, exportSettings)
|
||||
{
|
||||
if (exportSettings == null || exportSettings.InverseAxis != VrmSpecificationInverseAxis)
|
||||
{
|
||||
throw new Exception( $"VRM specification requires InverseAxis settings as {VrmSpecificationInverseAxis}");
|
||||
}
|
||||
|
||||
gltf.extensionsUsed.Add(glTF_VRM_extensions.ExtensionName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user