Skip to content

Commit

Permalink
[PE] Added a 'All on' and 'All of' buttons for each individual object…
Browse files Browse the repository at this point in the history
… in the Colliders window.
  • Loading branch information
ShalltyB authored and ManlyMarco committed Dec 28, 2024
1 parent 9af3c54 commit 4b42a43
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions Core.PoseEditor/AMModules/CollidersEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,53 @@ public override void GUILogic()
}
if (total == 0)
continue;

if (cd == null || cd.ignoredDynamicBones.TryGetValue(controller, out HashSet<object> ignored) == false)
ignored = null;

GUILayout.BeginVertical(GUI.skin.box);
GUILayout.BeginHorizontal();
GUILayout.Label(controller.target.oci.treeNodeObject.textName + " (" + controller.target.oci.guideObject.transformTarget.name + ") ", GUILayout.ExpandWidth(false));
if (GUILayout.Button("Center camera on", GUILayout.ExpandWidth(false)))
Studio.Studio.Instance.cameraCtrl.targetPos = controller.target.oci.guideObject.transformTarget.position;
if (GUILayout.Button("All off", GUILayout.ExpandWidth(false)))
{
foreach (DynamicBone dynamicBone in controller._dynamicBonesEditor._dynamicBones)
SetIgnoreDynamicBone(_colliderTarget, controller, dynamicBone, true);

if (
#if AISHOUJO || HONEYSELECT2
this._isTargetNormalCollider &&
#endif
charaPoseController != null &&
charaPoseController._boobsEditor != null
)
{
foreach (DynamicBone_Ver02 dynamicBone in charaPoseController._boobsEditor._dynamicBones)
SetIgnoreDynamicBone(_colliderTarget, controller, dynamicBone, true);

}
}
if (GUILayout.Button("All on", GUILayout.ExpandWidth(false)))
{
foreach (DynamicBone dynamicBone in controller._dynamicBonesEditor._dynamicBones)
SetIgnoreDynamicBone(_colliderTarget, controller, dynamicBone, false);

if (
#if AISHOUJO || HONEYSELECT2
this._isTargetNormalCollider &&
#endif
charaPoseController != null &&
charaPoseController._boobsEditor != null
)
{
foreach (DynamicBone_Ver02 dynamicBone in charaPoseController._boobsEditor._dynamicBones)
SetIgnoreDynamicBone(_colliderTarget, controller, dynamicBone, false);

}
}
GUILayout.EndHorizontal();

HashSet<object> ignored;
if (cd == null || cd.ignoredDynamicBones.TryGetValue(controller, out ignored) == false)
ignored = null;
int i = 1;
GUILayout.BeginHorizontal();
foreach (DynamicBone dynamicBone in controller._dynamicBonesEditor._dynamicBones)
Expand Down Expand Up @@ -752,6 +790,7 @@ public override void GUILogic()
}
}
GUILayout.EndHorizontal();
GUILayout.EndVertical();
}
GUILayout.EndScrollView();
}
Expand Down

0 comments on commit 4b42a43

Please sign in to comment.