From d2e2f8403ef1fd789a1e65aabb90b0d88568fb0f Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Fri, 22 Oct 2021 20:31:28 +0900 Subject: [PATCH] =?UTF-8?q?VRM=200.x=20=E3=81=AE=E4=BB=95=E6=A7=98?= =?UTF-8?q?=E3=81=AB=E5=8F=8D=E3=81=99=E3=82=8B=E5=A4=89=E6=8F=9B=20Export?= =?UTF-8?q?=20=E3=81=AF=20throw=20=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM/Runtime/IO/VRMExporter.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/VRM/Runtime/IO/VRMExporter.cs b/Assets/VRM/Runtime/IO/VRMExporter.cs index 2f7b4b6c9..91b1d80a3 100644 --- a/Assets/VRM/Runtime/IO/VRMExporter.cs +++ b/Assets/VRM/Runtime/IO/VRMExporter.cs @@ -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); }