From d35e42b2c43dd0721f0627903bf4e6e260884870 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 21 Jan 2019 16:20:47 +0900 Subject: [PATCH] UniGLTF menu to VRM/UniGLTF. UniVRM menu to VRM/UniVRM --- Assets/VRM/UniGLTF/Scripts/Editor/ImporterMenu.cs | 2 +- Assets/VRM/UniGLTF/Scripts/Editor/UniGLTFVersionMenu.cs | 4 ++-- .../IO/ShaderPropExporter/PreShaderPropExporter.cs | 2 +- Assets/VRM/UniGLTF/Scripts/IO/StaticMeshIntegrator.cs | 4 ++-- Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs | 2 +- Assets/VRM/UniGLTF/Scripts/UniGLTFVersion_partial.cs | 6 +++--- Assets/VRM/UniVRM/DevOnly/Editor/VRMExportUnityPackage.cs | 2 +- .../VRM/UniVRM/Scripts/Format/Editor/VRMExporterMenu.cs | 2 +- .../Scripts/Format/Editor/VRMHumanoidNormalizerMenu.cs | 2 +- .../VRM/UniVRM/Scripts/Format/Editor/VRMImporterMenu.cs | 2 +- Assets/VRM/UniVRM/Scripts/Format/Editor/VRMVersionMenu.cs | 6 +++--- Assets/VRM/UniVRM/Scripts/Format/VRMVersionPartial.cs | 3 ++- Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringUtility.cs | 8 ++++---- 13 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Assets/VRM/UniGLTF/Scripts/Editor/ImporterMenu.cs b/Assets/VRM/UniGLTF/Scripts/Editor/ImporterMenu.cs index 816600e1f..63f450459 100644 --- a/Assets/VRM/UniGLTF/Scripts/Editor/ImporterMenu.cs +++ b/Assets/VRM/UniGLTF/Scripts/Editor/ImporterMenu.cs @@ -7,7 +7,7 @@ namespace UniGLTF { public static class ImporterMenu { - [MenuItem(UniGLTFVersion.UNIGLTF_VERSION + "/Import", priority = 1)] + [MenuItem(UniGLTFVersion.MENU + "/Import", priority = 1)] public static void ImportMenu() { var path = EditorUtility.OpenFilePanel("open gltf", "", "gltf,glb,zip"); diff --git a/Assets/VRM/UniGLTF/Scripts/Editor/UniGLTFVersionMenu.cs b/Assets/VRM/UniGLTF/Scripts/Editor/UniGLTFVersionMenu.cs index 259771594..20579b3da 100644 --- a/Assets/VRM/UniGLTF/Scripts/Editor/UniGLTFVersionMenu.cs +++ b/Assets/VRM/UniGLTF/Scripts/Editor/UniGLTFVersionMenu.cs @@ -25,7 +25,7 @@ namespace UniGLTF }} "; - [MenuItem(UniGLTFVersion.UNIGLTF_VERSION + "/Increment", priority = MENU_PRIORITY)] + [MenuItem(UniGLTFVersion.MENU + "/Increment", priority = MENU_PRIORITY)] public static void IncrementVersion() { var source = string.Format(template, UniGLTFVersion.MAJOR, UniGLTFVersion.MINOR + 1); @@ -33,7 +33,7 @@ namespace UniGLTF AssetDatabase.Refresh(); } - [MenuItem(UniGLTFVersion.UNIGLTF_VERSION + "/Decrement", priority = MENU_PRIORITY)] + [MenuItem(UniGLTFVersion.MENU + "/Decrement", priority = MENU_PRIORITY)] public static void DecrementVersion() { var source = string.Format(template, UniGLTFVersion.MAJOR, UniGLTFVersion.MINOR - 1); diff --git a/Assets/VRM/UniGLTF/Scripts/IO/ShaderPropExporter/PreShaderPropExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/ShaderPropExporter/PreShaderPropExporter.cs index b170f7eac..afa6be872 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/ShaderPropExporter/PreShaderPropExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/ShaderPropExporter/PreShaderPropExporter.cs @@ -44,7 +44,7 @@ namespace UniGLTF.ShaderPropExporter #pragma warning restore 414 #if UNITY_EDITOR - [MenuItem(UniGLTFVersion.UNIGLTF_VERSION + "/PreExport ShaderProps")] + [MenuItem(UniGLTFVersion.MENU + "/PreExport ShaderProps")] public static void PreExport() { foreach (var fi in typeof(PreShaderPropExporter).GetFields( diff --git a/Assets/VRM/UniGLTF/Scripts/IO/StaticMeshIntegrator.cs b/Assets/VRM/UniGLTF/Scripts/IO/StaticMeshIntegrator.cs index a6bd91937..200b11a09 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/StaticMeshIntegrator.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/StaticMeshIntegrator.cs @@ -119,13 +119,13 @@ namespace UniGLTF } #if UNITY_EDITOR - [MenuItem(UniGLTFVersion.UNIGLTF_VERSION + "/Integrate static mesh", validate = true)] + [MenuItem(UniGLTFVersion.MENU + "/Integrate static mesh", validate = true)] public static bool CanIntegrateSelected() { return Selection.activeObject != null && Selection.activeObject is GameObject; } - [MenuItem(UniGLTFVersion.UNIGLTF_VERSION + "/Integrate static mesh")] + [MenuItem(UniGLTFVersion.MENU + "/Integrate static mesh")] public static void IntegrateSelected() { var go = Selection.activeObject as GameObject; diff --git a/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs b/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs index 32298b858..ed6d0f396 100644 --- a/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs +++ b/Assets/VRM/UniGLTF/Scripts/IO/gltfExporter.cs @@ -12,7 +12,7 @@ namespace UniGLTF { public class gltfExporter : IDisposable { - const string CONVERT_HUMANOID_KEY = UniGLTFVersion.UNIGLTF_VERSION + "/Export"; + const string CONVERT_HUMANOID_KEY = UniGLTFVersion.MENU + "/Export"; #if UNITY_EDITOR [MenuItem(CONVERT_HUMANOID_KEY, true, 1)] diff --git a/Assets/VRM/UniGLTF/Scripts/UniGLTFVersion_partial.cs b/Assets/VRM/UniGLTF/Scripts/UniGLTFVersion_partial.cs index 72033936a..aff790da9 100644 --- a/Assets/VRM/UniGLTF/Scripts/UniGLTFVersion_partial.cs +++ b/Assets/VRM/UniGLTF/Scripts/UniGLTFVersion_partial.cs @@ -1,8 +1,8 @@ - -namespace UniGLTF +namespace UniGLTF { public static partial class UniGLTFVersion { public const string UNIGLTF_VERSION = "UniGLTF-" + VERSION; + public const string MENU = "VRM/" + UNIGLTF_VERSION; } -} +} \ No newline at end of file diff --git a/Assets/VRM/UniVRM/DevOnly/Editor/VRMExportUnityPackage.cs b/Assets/VRM/UniVRM/DevOnly/Editor/VRMExportUnityPackage.cs index d40298675..002232edc 100644 --- a/Assets/VRM/UniVRM/DevOnly/Editor/VRMExportUnityPackage.cs +++ b/Assets/VRM/UniVRM/DevOnly/Editor/VRMExportUnityPackage.cs @@ -123,7 +123,7 @@ namespace VRM.DevOnly.PackageExporter } } - [MenuItem(VRMVersion.VRM_VERSION + "/Export unitypackage")] + [MenuItem(VRMVersion.MENU + "/Export unitypackage")] public static void CreateUnityPackageWithBuild() { //var folder = GetDesktop(); diff --git a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMExporterMenu.cs b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMExporterMenu.cs index 80827758d..a172a48f9 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMExporterMenu.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMExporterMenu.cs @@ -61,7 +61,7 @@ namespace VRM public static class VRMExporterMenu { - const string CONVERT_HUMANOID_KEY = VRMVersion.VRM_VERSION + "/Export humanoid"; + const string CONVERT_HUMANOID_KEY = VRMVersion.MENU + "/Export humanoid"; [MenuItem(CONVERT_HUMANOID_KEY, true, 1)] private static bool ExportValidate() diff --git a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMHumanoidNormalizerMenu.cs b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMHumanoidNormalizerMenu.cs index a67a9025f..53f2f0a03 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMHumanoidNormalizerMenu.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMHumanoidNormalizerMenu.cs @@ -8,7 +8,7 @@ namespace VRM { public static class VRMHumanoidNorimalizerMenu { - const string MENU_KEY = VRMVersion.VRM_VERSION + "/Freeze T-Pose"; + const string MENU_KEY = VRMVersion.MENU + "/Freeze T-Pose"; [MenuItem(MENU_KEY, true, 1)] private static bool ExportValidate() { diff --git a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMImporterMenu.cs b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMImporterMenu.cs index eca43efe1..a65e35fe9 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMImporterMenu.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMImporterMenu.cs @@ -8,7 +8,7 @@ namespace VRM { public static class VRMImporterMenu { - [MenuItem(VRMVersion.VRM_VERSION + "/Import", priority = 1)] + [MenuItem(VRMVersion.MENU + "/Import", priority = 1)] static void ImportMenu() { var path = EditorUtility.OpenFilePanel("open vrm", "", "vrm"); diff --git a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMVersionMenu.cs b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMVersionMenu.cs index 7fe4d256a..da60966fc 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMVersionMenu.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/Editor/VRMVersionMenu.cs @@ -25,7 +25,7 @@ namespace VRM "; #if VRM_DEVELOP - [MenuItem(VRMVersion.VRM_VERSION + "/Increment")] + [MenuItem(VRMVersion.MENU + "/Increment")] #endif static void IncrementVersion() { @@ -35,7 +35,7 @@ namespace VRM } #if VRM_DEVELOP - [MenuItem(VRMVersion.VRM_VERSION + "/Decrement")] + [MenuItem(VRMVersion.MENU + "/Decrement")] #endif static void DecrementVersion() { @@ -135,7 +135,7 @@ namespace VRM } #if VRM_DEVELOP - [MenuItem(VRMVersion.VRM_VERSION + "/Export JsonSchema")] + [MenuItem(VRMVersion.MENU + "/Export JsonSchema")] #endif static void ExportJsonSchema() { diff --git a/Assets/VRM/UniVRM/Scripts/Format/VRMVersionPartial.cs b/Assets/VRM/UniVRM/Scripts/Format/VRMVersionPartial.cs index f65b11bbf..00e614fb7 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/VRMVersionPartial.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/VRMVersionPartial.cs @@ -1,4 +1,4 @@ - + using System; namespace VRM @@ -49,5 +49,6 @@ namespace VRM } public const string VRM_VERSION = "UniVRM-" + VERSION; + public const string MENU = "VRM/" + VRM_VERSION; } } diff --git a/Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringUtility.cs b/Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringUtility.cs index 1f1617f0f..25a9d1bb5 100644 --- a/Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringUtility.cs +++ b/Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringUtility.cs @@ -16,7 +16,7 @@ namespace VRM { #if UNITY_EDITOR #region save - [MenuItem(VRMVersion.VRM_VERSION + "/SaveSpringBoneToJSON", validate = true)] + [MenuItem(VRMVersion.MENU + "/SaveSpringBoneToJSON", validate = true)] static bool SaveSpringBoneToJSONIsEnable() { var root = Selection.activeObject as GameObject; @@ -34,7 +34,7 @@ namespace VRM return true; } - [MenuItem(VRMVersion.VRM_VERSION + "/SaveSpringBoneToJSON")] + [MenuItem(VRMVersion.MENU + "/SaveSpringBoneToJSON")] static void SaveSpringBoneToJSON() { var path = EditorUtility.SaveFilePanel( @@ -62,7 +62,7 @@ namespace VRM #endregion #region load - [MenuItem(VRMVersion.VRM_VERSION + "/LoadSpringBoneFromJSON", true)] + [MenuItem(VRMVersion.MENU + "/LoadSpringBoneFromJSON", true)] static bool LoadSpringBoneFromJSONIsEnable() { var root = Selection.activeObject as GameObject; @@ -80,7 +80,7 @@ namespace VRM return true; } - [MenuItem(VRMVersion.VRM_VERSION + "/LoadSpringBoneFromJSON")] + [MenuItem(VRMVersion.MENU + "/LoadSpringBoneFromJSON")] static void LoadSpringBoneFromJSON() { var path = EditorUtility.OpenFilePanel(