Skip to content

Commit

Permalink
Message test changes + animation frame ui cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PassiveModding committed Aug 1, 2024
1 parent 97d095b commit 3ba4bb1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
34 changes: 25 additions & 9 deletions Meddle/Meddle.Plugin/UI/AnimationTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ private void OnFrameworkUpdate(IFramework framework1)

public unsafe void Draw()
{
// Warning text:
ImGui.TextWrapped("NOTE: Animation exports are experimental, held weapons, mounts and other attached objects may not work as expected.");

ICharacter[] objects;
if (clientState.LocalPlayer != null)
{
Expand Down Expand Up @@ -124,18 +127,31 @@ public unsafe void Draw()
{
if (ImGui.CollapsingHeader($"Frame: {frame.Time}##{frame.GetHashCode()}"))
{
foreach (var partial in frame.Skeleton.PartialSkeletons)
try
{
ImGui.Text($"Partial: {partial.HandlePath}");
ImGui.Text($"Connected Bone Index: {partial.ConnectedBoneIndex}");
var poseData = partial.Poses.FirstOrDefault();
if (poseData == null) continue;
for (int i = 0; i < poseData.Pose.Count; i++)
ImGui.Indent();
foreach (var partial in frame.Skeleton.PartialSkeletons)
{
var transform = poseData.Pose[i];
ImGui.Text(
$"Bone: {i} Scale: {transform.Scale} Rotation: {transform.Rotation} Translation: {transform.Translation}");
if (ImGui.CollapsingHeader($"Partial: {partial.HandlePath}##{partial.GetHashCode()}"))
{
ImGui.Text($"Connected Bone Index: {partial.ConnectedBoneIndex}");
var poseData = partial.Poses.FirstOrDefault();
if (poseData == null) continue;
for (int i = 0; i < poseData.Pose.Count; i++)
{
var transform = poseData.Pose[i];
var boneName = partial.HkSkeleton?.BoneNames[i] ?? "Bone";
ImGui.Text($"[{i}]{boneName} " +
$"Scale: {transform.Scale} " +
$"Rotation: {transform.Rotation} " +
$"Translation: {transform.Translation}");
}
}
}
}
finally
{
ImGui.Unindent();
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions Meddle/Meddle.Plugin/UI/CharacterTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ public void Dispose()
private void DrawObjectPicker()
{
// Warning text:
ImGui.TextWrapped("Meddle allows you to export character data. Select a character to begin.");
ImGui.Separator();
ImGui.TextWrapped("Warning: This plugin is experimental and may not work as expected.");
ImGui.TextWrapped(
"Exported models use a rudimentary approximation of the games pixel shaders, they will likely not match 1:1 to the in-game appearance.");
ImGui.TextWrapped("NOTE: Exported models use a rudimentary approximation of the games pixel shaders, " +
"they will likely not match 1:1 to the in-game appearance.");

if (LastLog != null)
{
Expand Down

0 comments on commit 3ba4bb1

Please sign in to comment.