Skip to content

Commit

Permalink
Fix partial skeleton view menu id
Browse files Browse the repository at this point in the history
  • Loading branch information
PassiveModding committed Jul 9, 2024
1 parent fd64548 commit a625600
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions Meddle/Meddle.Plugin/UI/CharacterTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,41 +149,45 @@ private void DrawSkeleton(Skeleton.Skeleton skeleton)
ImGui.Indent();
foreach (var partialSkeleton in skeleton.PartialSkeletons)
{
ImGui.PushID(partialSkeleton.GetHashCode());
if (ImGui.CollapsingHeader($"Partial Skeleton Connected At {partialSkeleton.ConnectedBoneIndex}"))
{
ImGui.Indent();
var hkSkeleton = partialSkeleton.HkSkeleton;
if (hkSkeleton == null)
{
continue;
ImGui.Text("No skeleton data");
}

ImGui.Text($"ConnectedBoneIdx: {partialSkeleton.ConnectedBoneIndex}");
ImGui.Columns(3);
ImGui.Text("Bone Names");
ImGui.NextColumn();
ImGui.Text("Bone Parents");
ImGui.NextColumn();
ImGui.Text("Transform");
ImGui.NextColumn();
for (var i = 0; i < hkSkeleton.BoneNames.Count; i++)
else
{
ImGui.Text(hkSkeleton.BoneNames[i]);
ImGui.Text($"ConnectedBoneIdx: {partialSkeleton.ConnectedBoneIndex}");
ImGui.Columns(3);
ImGui.Text("Bone Names");
ImGui.NextColumn();
ImGui.Text($"{hkSkeleton.BoneParents[i]}");
ImGui.Text("Bone Parents");
ImGui.NextColumn();
var transform = hkSkeleton.ReferencePose[i].AffineTransform;
ImGui.Text($"Scale: {transform.Scale}");
ImGui.Text($"Rotation: {transform.Rotation}");
ImGui.Text($"Translation: {transform.Translation}");
ImGui.Text("Transform");
ImGui.NextColumn();
for (var i = 0; i < hkSkeleton.BoneNames.Count; i++)
{
ImGui.Text(hkSkeleton.BoneNames[i]);
ImGui.NextColumn();
ImGui.Text($"{hkSkeleton.BoneParents[i]}");
ImGui.NextColumn();
var transform = hkSkeleton.ReferencePose[i].AffineTransform;
ImGui.Text($"Scale: {transform.Scale}");
ImGui.Text($"Rotation: {transform.Rotation}");
ImGui.Text($"Translation: {transform.Translation}");
ImGui.NextColumn();
}

ImGui.Columns(1);
}

ImGui.Columns(1);
ImGui.Unindent();
}
ImGui.PopID();
}

ImGui.Unindent();
}

Expand Down

0 comments on commit a625600

Please sign in to comment.