Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpringBoneWindow が見切れるのを修正。初期選択も実装 #881

Merged
merged 1 commit into from
Apr 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ namespace UniVRM10
/// </summary>
public class VRM10SpringSelectorWindow : EditorWindow
{
const string MENU_KEY = VRMVersion.MENU + "/SpringBone";
const string MENU_KEY = VRMVersion.MENU + "/SpringBone Window";

[MenuItem(MENU_KEY, false, 0)]
private static void ExportFromMenu()
{
var window = (VRM10SpringSelectorWindow)GetWindow(typeof(VRM10SpringSelectorWindow));
window.titleContent = new GUIContent("SpringBone selector");
window.Show();
window.Root = Selection.activeTransform;
}

void OnEnable()
Expand Down Expand Up @@ -70,6 +71,8 @@ void Reload()
Root = backup;
}

Vector2 m_scrollPosition;

private void OnGUI()
{
Root = (Transform)EditorGUILayout.ObjectField("vrm1 root", m_root, typeof(Transform), true);
Expand All @@ -79,6 +82,13 @@ private void OnGUI()
Reload();
}

m_scrollPosition = EditorGUILayout.BeginScrollView(m_scrollPosition);
DrawContent();
EditorGUILayout.EndScrollView();
}

void DrawContent()
{
GUI.enabled = false;
s_foldSprings = EditorGUILayout.Foldout(s_foldSprings, "springs");
if (s_foldSprings)
Expand Down