From a7be8b6f52d6facec1d7377975b2358e3706bf8e Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 17 Sep 2025 15:29:21 +0900 Subject: [PATCH] =?UTF-8?q?default=20handle=20=E3=81=A8=20=E5=9B=9E?= =?UTF-8?q?=E8=BB=A2=20offset=20=E3=81=AE=E5=88=87=E3=82=8A=E6=9B=BF?= =?UTF-8?q?=E3=81=88=E3=82=92=20AngleLimitSettings=20=E3=81=AE=20fold=20?= =?UTF-8?q?=E3=81=A8=E5=AF=BE=E5=BF=9C=E3=81=95=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SpringBone/VRM10SpringBoneJointEditor.cs | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Assets/VRM10/Editor/Components/SpringBone/VRM10SpringBoneJointEditor.cs b/Assets/VRM10/Editor/Components/SpringBone/VRM10SpringBoneJointEditor.cs index 00c919e11..b72e8f686 100644 --- a/Assets/VRM10/Editor/Components/SpringBone/VRM10SpringBoneJointEditor.cs +++ b/Assets/VRM10/Editor/Components/SpringBone/VRM10SpringBoneJointEditor.cs @@ -89,7 +89,12 @@ namespace UniVRM10 // // angle limit // - m_showAnglelimitSettings = EditorGUILayout.Foldout(m_showAnglelimitSettings, "AngleLimit Settings (experimental)"); + var fold = EditorGUILayout.Foldout(m_showAnglelimitSettings, "AngleLimit Settings (experimental)"); + if (m_showAnglelimitSettings != fold) + { + m_showAnglelimitSettings = fold; + SceneView.RepaintAll(); + } if (m_showAnglelimitSettings) { EditorGUILayout.HelpBox("SpringBoneの角度制限はまだdraft仕様です。将来的に仕様が変更される可能性があります。また、VRMファイルへのインポート・エクスポート機能はまだ実装されていません。\nThe angle limit feature for SpringBone is still in draft status. The specifications may change in the future. Also, the import/export of VRM files has not yet been implemented.", MessageType.Warning); @@ -260,6 +265,8 @@ namespace UniVRM10 void OnSceneGUI() { + Tools.hidden = false; + if (m_root == null) { return; @@ -291,20 +298,19 @@ namespace UniVRM10 var limit_tail_pos = Vector3.up * local_axis.magnitude; var limitRotation = calcSpringboneLimitSpace(head.rotation, local_axis); - if (m_target.m_anglelimitType == UniGLTF.SpringBoneJobs.AnglelimitTypes.None) - { - Tools.hidden = false; - } - else + if (m_showAnglelimitSettings) { Tools.hidden = true; - if (HandleLimitRotation(Matrix4x4.TRS(head.position, limitRotation, Vector3.one))) + if (m_target.m_anglelimitType != UniGLTF.SpringBoneJobs.AnglelimitTypes.None) { - if (Application.isPlaying) + if (HandleLimitRotation(Matrix4x4.TRS(head.position, limitRotation, Vector3.one))) { - if (m_root != null) + if (Application.isPlaying) { - m_root.Runtime.SpringBone.SetJointLevel(m_target.transform, m_target.Blittable); + if (m_root != null) + { + m_root.Runtime.SpringBone.SetJointLevel(m_target.transform, m_target.Blittable); + } } } }