浏览代码

Disable all meido dragpoints when disabling IK

Keeping the transform capsule enabled when disabling IK doesn't seem
like it'd be useful.
habeebweeb 4 年之前
父节点
当前提交
da66b777bc

+ 4 - 2
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/DragPoint/DragPointOther.cs

@@ -7,11 +7,13 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
     internal class DragPointBody : DragPointGeneral
     {
         public bool IsCube = false;
+        public bool IsIK = false;
         protected override void ApplyDragType()
         {
             DragType current = CurrentDragType;
-            bool transforming = !(current == DragType.None || current == DragType.Delete);
-            ApplyProperties(transforming, IsCube && transforming, false);
+            bool enabled = !IsIK && (Transforming || (current == DragType.Select));
+            bool select = IsIK && current == DragType.Select;
+            ApplyProperties(enabled || select, IsCube && enabled, false);
         }
     }
 

+ 1 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Meido/MeidoDragPointManager.cs

@@ -133,6 +133,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
                     DragPointHead head = (DragPointHead)DragPoints[Bone.Head];
                     head.gameObject.SetActive(true);
                     head.IsIK = !active;
+                    dragBody.IsIK = !active;
                 }
             }
         }