mirror of
https://github.com/4sval/FModel.git
synced 2026-04-25 07:21:54 -05:00
added back transforms manual inputs
This commit is contained in:
parent
364df7f402
commit
e6ef05092e
|
|
@ -123,7 +123,7 @@ public class Renderer : IDisposable
|
||||||
|
|
||||||
public void Animate(UObject anim)
|
public void Animate(UObject anim)
|
||||||
{
|
{
|
||||||
if (!Options.ModelIsWaitingAnimation)
|
if (!Services.ApplicationService.ApplicationView.CUE4Parse.ModelIsWaitingAnimation)
|
||||||
{
|
{
|
||||||
if (anim is UAnimSequenceBase animBase)
|
if (anim is UAnimSequenceBase animBase)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -624,6 +624,9 @@ Snooper aims to give an accurate preview of models, materials, skeletal animatio
|
||||||
ImGui.EndTable();
|
ImGui.EndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SeparatorText("Manual Inputs");
|
||||||
|
model.Transforms[model.SelectedInstance].ImGuiTransform(s.Renderer.CameraOp.Speed / 100f);
|
||||||
|
|
||||||
ImGui.EndTabItem();
|
ImGui.EndTabItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using CUE4Parse.UE4.Objects.Core.Math;
|
using CUE4Parse.UE4.Objects.Core.Math;
|
||||||
|
using ImGuiNET;
|
||||||
|
|
||||||
namespace FModel.Views.Snooper;
|
namespace FModel.Views.Snooper;
|
||||||
|
|
||||||
|
|
@ -48,5 +49,55 @@ public class Transform
|
||||||
ModifyLocal(_saved.Value);
|
ModifyLocal(_saved.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ImGuiTransform(float speed)
|
||||||
|
{
|
||||||
|
const float width = 100f;
|
||||||
|
|
||||||
|
if (ImGui.TreeNode("Position"))
|
||||||
|
{
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("X", ref Position.X, speed, 0f, 0f, "%.2f m");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("Y", ref Position.Y, speed, 0f, 0f, "%.2f m");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("Z", ref Position.Z, speed, 0f, 0f, "%.2f m");
|
||||||
|
|
||||||
|
ImGui.TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.TreeNode("Rotation"))
|
||||||
|
{
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("W", ref Rotation.W, .005f, 0f, 0f, "%.3f rad");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("X", ref Rotation.X, .005f, 0f, 0f, "%.3f rad");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("Y", ref Rotation.Y, .005f, 0f, 0f, "%.3f rad");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("Z", ref Rotation.Z, .005f, 0f, 0f, "%.3f rad");
|
||||||
|
|
||||||
|
ImGui.TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.TreeNode("Scale"))
|
||||||
|
{
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("X", ref Scale.X, speed, 0f, 0f, "%.3f");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("Y", ref Scale.Y, speed, 0f, 0f, "%.3f");
|
||||||
|
|
||||||
|
ImGui.SetNextItemWidth(width);
|
||||||
|
ImGui.DragFloat("Z", ref Scale.Z, speed, 0f, 0f, "%.3f");
|
||||||
|
|
||||||
|
ImGui.TreePop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToString() => Matrix.Translation.ToString();
|
public override string ToString() => Matrix.Translation.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user