diff --git a/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs b/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs index efb01b671..b12327094 100644 --- a/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs +++ b/Assets/VRM/Editor/Format/VRMEditorImporterContext.cs @@ -149,7 +149,7 @@ namespace VRM .Where(x => x.IsUsed) .Select(x => (new SubAssetKey(typeof(Texture2D), x.Texture.name), x.Texture)) .ToArray(); - var vrmTextures = new VRMMtoonMaterialImporter(m_context.VRM); + var vrmTextures = new VRMMaterialImporter(m_context.VRM); var dirName = $"{m_prefabPath.FileNameWithoutExtension}.Textures"; TextureExtractor.ExtractTextures(m_context.Parser, m_prefabPath.Parent.Child(dirName), vrmTextures.EnumerateAllTexturesDistinct, subAssets, (_x, _y) => { }, onTextureReloaded); } diff --git a/Assets/VRM/Editor/Format/VRMImporterMenu.cs b/Assets/VRM/Editor/Format/VRMImporterMenu.cs index f86014ccc..2eca60a7e 100644 --- a/Assets/VRM/Editor/Format/VRMImporterMenu.cs +++ b/Assets/VRM/Editor/Format/VRMImporterMenu.cs @@ -83,7 +83,7 @@ namespace VRM using (var context = new VRMImporterContext(parser, map)) { var editor = new VRMEditorImporterContext(context, prefabPath); - foreach (var (key, textureInfo) in new VRMMtoonMaterialImporter(context.VRM).EnumerateAllTexturesDistinct(parser)) + foreach (var (key, textureInfo) in new VRMMaterialImporter(context.VRM).EnumerateAllTexturesDistinct(parser)) { TextureImporterConfigurator.Configure(textureInfo, map.ToDictionary(x => x.name, x => x.texture as Texture2D)); } diff --git a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs index 4709b1b28..4e35e2ad2 100644 --- a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs +++ b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs @@ -60,7 +60,7 @@ namespace VRM using (var context = new VRMImporterContext(parser, map)) { var editor = new VRMEditorImporterContext(context, prefabPath); - foreach (var (key, textureInfo) in new VRMMtoonMaterialImporter(context.VRM).EnumerateAllTexturesDistinct(parser)) + foreach (var (key, textureInfo) in new VRMMaterialImporter(context.VRM).EnumerateAllTexturesDistinct(parser)) { TextureImporterConfigurator.Configure(textureInfo, map.ToDictionary(x => x.name, x => x.texture as Texture2D)); } diff --git a/Assets/VRM/Runtime/IO/VRMImporterContext.cs b/Assets/VRM/Runtime/IO/VRMImporterContext.cs index b2834e087..8e1ec6b6c 100644 --- a/Assets/VRM/Runtime/IO/VRMImporterContext.cs +++ b/Assets/VRM/Runtime/IO/VRMImporterContext.cs @@ -26,7 +26,7 @@ namespace VRM { VRM = vrm; // override material importer - GltfMaterialImporter.GltfMaterialParamProcessors.Insert(0, new VRMMtoonMaterialImporter(VRM).TryCreateParam); + GltfMaterialImporter.GltfMaterialParamProcessors.Insert(0, new VRMMaterialImporter(VRM).TryCreateParam); } else { diff --git a/Assets/VRM/Runtime/IO/VRMMtoonMaterialImporter.cs b/Assets/VRM/Runtime/IO/VRMMaterialImporter.cs similarity index 98% rename from Assets/VRM/Runtime/IO/VRMMtoonMaterialImporter.cs rename to Assets/VRM/Runtime/IO/VRMMaterialImporter.cs index 75470b3c5..f3b12bacf 100644 --- a/Assets/VRM/Runtime/IO/VRMMtoonMaterialImporter.cs +++ b/Assets/VRM/Runtime/IO/VRMMaterialImporter.cs @@ -6,10 +6,10 @@ using VRMShaders; namespace VRM { - public class VRMMtoonMaterialImporter + public class VRMMaterialImporter { readonly glTF_VRM_extensions m_vrm; - public VRMMtoonMaterialImporter(glTF_VRM_extensions vrm) + public VRMMaterialImporter(glTF_VRM_extensions vrm) { m_vrm = vrm; } diff --git a/Assets/VRM/Runtime/IO/VRMMtoonMaterialImporter.cs.meta b/Assets/VRM/Runtime/IO/VRMMaterialImporter.cs.meta similarity index 83% rename from Assets/VRM/Runtime/IO/VRMMtoonMaterialImporter.cs.meta rename to Assets/VRM/Runtime/IO/VRMMaterialImporter.cs.meta index ea615db5e..3d007fd1d 100644 --- a/Assets/VRM/Runtime/IO/VRMMtoonMaterialImporter.cs.meta +++ b/Assets/VRM/Runtime/IO/VRMMaterialImporter.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bad75b40d017eb74ba79f561d22dc372 +guid: 9dd63f87d0de96f4ca4ad4dcd8540584 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/VRM/Tests/MToonTest.cs b/Assets/VRM/Tests/MToonTest.cs index c2c651597..a48d15195 100644 --- a/Assets/VRM/Tests/MToonTest.cs +++ b/Assets/VRM/Tests/MToonTest.cs @@ -30,7 +30,7 @@ namespace VRM var vrmMaterial = VRMMaterialExporter.CreateFromMaterial(srcMaterial, textureManager); Assert.AreEqual(vrmMaterial.vectorProperties["_MainTex"], new float[] { 0.3f, 0.2f, 0.5f, 0.6f }); - var materialImporter = new VRMMtoonMaterialImporter(new glTF_VRM_extensions + var materialImporter = new VRMMaterialImporter(new glTF_VRM_extensions { materialProperties = new System.Collections.Generic.List { vrmMaterial } }); @@ -49,7 +49,7 @@ namespace VRM var importer = new VRMImporterContext(parser, null); - var materialImporter = new VRMMtoonMaterialImporter(importer.VRM); + var materialImporter = new VRMMaterialImporter(importer.VRM); Assert.AreEqual(73, parser.GLTF.materials.Count); Assert.True(materialImporter.TryCreateParam(parser, 0, out MaterialImportParam param)); diff --git a/Assets/VRM/Tests/VRMTextureEnumerateTests.cs b/Assets/VRM/Tests/VRMTextureEnumerateTests.cs index 5776765ad..18d544b66 100644 --- a/Assets/VRM/Tests/VRMTextureEnumerateTests.cs +++ b/Assets/VRM/Tests/VRMTextureEnumerateTests.cs @@ -72,7 +72,7 @@ namespace VRM }, } }; - var items = new VRMMtoonMaterialImporter(vrm).EnumerateAllTexturesDistinct(parser).ToArray(); + var items = new VRMMaterialImporter(vrm).EnumerateAllTexturesDistinct(parser).ToArray(); Assert.AreEqual(1, items.Length); } }