Browse Source

Hide bones when transforming maid

Bones use modifier keys (ctrl, alt, shift) to determine behaviour.
While transforming (move, rotate, scale), modifiers can be used to
alter behaviour.

Since only modifier keys determine drag point behaviour, just prevent
anything from happening when transform keys are used.
habeebweeb 3 years ago
parent
commit
b5ec3a53ec

+ 1 - 2
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/DragPoint/DragPoint.cs

@@ -180,8 +180,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
         {
         {
             return InputManager.GetKey(MpsKey.DragSelect) || InputManager.GetKey(MpsKey.DragDelete)
             return InputManager.GetKey(MpsKey.DragSelect) || InputManager.GetKey(MpsKey.DragDelete)
                 || InputManager.GetKey(MpsKey.DragMove) || InputManager.GetKey(MpsKey.DragRotate)
                 || InputManager.GetKey(MpsKey.DragMove) || InputManager.GetKey(MpsKey.DragRotate)
-                || InputManager.GetKey(MpsKey.DragScale) || InputManager.GetKey(MpsKey.DragFinger)
-                || InputManager.Shift;
+                || InputManager.GetKey(MpsKey.DragScale) || InputManager.GetKey(MpsKey.DragFinger);
         }
         }
 
 
         protected Vector3 CursorPosition()
         protected Vector3 CursorPosition()

+ 3 - 2
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Meido/IK/DragPointSpine.cs

@@ -42,7 +42,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             bool shift = Input.Shift;
             bool shift = Input.Shift;
             bool alt = Input.Alt;
             bool alt = Input.Alt;
 
 
-            if (isThigh && !Input.Control && alt && shift)
+            if (OtherDragType()) CurrentDragType = DragType.Ignore;
+            else if (isThigh && !Input.Control && alt && shift)
             {
             {
                 // gizmo thigh rotation
                 // gizmo thigh rotation
                 CurrentDragType = DragType.RotLocalXZ;
                 CurrentDragType = DragType.RotLocalXZ;
@@ -62,7 +63,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             }
             }
             else
             else
             {
             {
-                CurrentDragType = OtherDragType() ? DragType.Ignore : DragType.None;
+                CurrentDragType = DragType.None;
             }
             }
         }
         }
 
 

+ 3 - 2
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Meido/IK/IK Chain/DragPointLimb.cs

@@ -66,13 +66,14 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             bool control = Input.Control;
             bool control = Input.Control;
             bool alt = Input.Alt;
             bool alt = Input.Alt;
             // Check for DragMove so that hand dragpoint is not in the way
             // Check for DragMove so that hand dragpoint is not in the way
-            if (control && !Input.GetKey(MpsKey.DragMove))
+            if (OtherDragType()) CurrentDragType = DragType.Ignore;
+            else if (control && !Input.GetKey(MpsKey.DragMove))
             {
             {
                 if (alt) CurrentDragType = DragType.RotY;
                 if (alt) CurrentDragType = DragType.RotY;
                 else CurrentDragType = DragType.MoveXZ;
                 else CurrentDragType = DragType.MoveXZ;
             }
             }
             else if (alt) CurrentDragType = Input.Shift ? DragType.RotLocalY : DragType.RotLocalXZ;
             else if (alt) CurrentDragType = Input.Shift ? DragType.RotLocalY : DragType.RotLocalXZ;
-            else CurrentDragType = OtherDragType() ? DragType.Ignore : DragType.None;
+            else CurrentDragType = Input.Shift ? DragType.Ignore : DragType.None;
         }
         }
 
 
         protected override void Drag()
         protected override void Drag()