mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-11 04:54:17 -05:00
Merge pull request #131 from dwango/organize_menu
UniGLTF menu to VRM/UniGLTF. UniVRM menu to VRM/UniVRM
This commit is contained in:
commit
6b5edd383d
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user