Merge pull request #131 from dwango/organize_menu

UniGLTF menu to VRM/UniGLTF. UniVRM menu to VRM/UniVRM
This commit is contained in:
ousttrue 2019-01-22 01:17:32 +09:00 committed by GitHub
commit 6b5edd383d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 23 additions and 22 deletions

View File

@ -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");

View File

@ -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);

View File

@ -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(

View File

@ -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;

View File

@ -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)]

View File

@ -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;
}
}
}

View File

@ -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();

View File

@ -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()

View File

@ -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()
{

View File

@ -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");

View File

@ -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()
{

View File

@ -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;
}
}

View File

@ -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(