mirror of
https://github.com/4sval/FModel.git
synced 2026-08-06 03:03:04 -05:00
disable root bone scaling on preview
This commit is contained in:
parent
924b52c544
commit
54a599fa12
|
|
@ -1 +1 @@
|
|||
Subproject commit 2b00fcf9de27eb4047c8fb41aa509940e43a8475
|
||||
Subproject commit 76a4c53afe1f26c24a84973f5228a6ef475de8b7
|
||||
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Numerics;
|
||||
using CUE4Parse_Conversion.Writers.ActorX.Structs.Animations;
|
||||
using CUE4Parse.UE4.Assets.Exports.Animation;
|
||||
using CUE4Parse.UE4.Objects.Core.Math;
|
||||
using CUE4Parse.UE4.Objects.Core.Misc;
|
||||
using FModel.Views.Snooper.Buffers;
|
||||
using FModel.Views.Snooper.Shading;
|
||||
|
|
@ -64,6 +65,7 @@ public class Skeleton : IDisposable
|
|||
bone.Rest.Relation = parentBone.Rest.Matrix;
|
||||
parentBone.LoweredChildNames.Add(boneName);
|
||||
}
|
||||
else bone.Rest.Scale = FVector.OneVector;
|
||||
|
||||
if (boneIndex == 0) SelectedBone = boneName;
|
||||
BonesByLoweredName[boneName] = bone;
|
||||
|
|
@ -203,6 +205,7 @@ public class Skeleton : IDisposable
|
|||
|
||||
sequence.Tracks[bone.SkeletonIndex].GetBoneTransform(f, sequence.NumFrames, ref boneOrientation, ref bonePosition, ref boneScale);
|
||||
if (!bone.IsRoot) boneMatrix = _boneMatriceAtFrame[bone.ParentIndex];
|
||||
else boneScale = bone.Rest.Scale;
|
||||
bonePosition = rotationOnly ? bone.Rest.Position : bonePosition * Constants.SCALE_DOWN_RATIO;
|
||||
|
||||
boneMatrix = new Transform
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ public class Renderer : IDisposable
|
|||
{
|
||||
addedModel.AddInstance(t);
|
||||
}
|
||||
else if (st.TryConvert(out var mesh))
|
||||
else if (st.TryConvert(out var mesh, EMeshQuality.Highest))
|
||||
{
|
||||
addedModel = new StaticModel(st, mesh, t);
|
||||
Options.Models[guid] = addedModel;
|
||||
|
|
@ -194,7 +194,7 @@ public class Renderer : IDisposable
|
|||
case USkeletalMesh sk:
|
||||
{
|
||||
guid = Guid.NewGuid();
|
||||
if (!Options.Models.ContainsKey(guid) && sk.TryConvert(out var mesh))
|
||||
if (!Options.Models.ContainsKey(guid) && sk.TryConvert(out var mesh, EMeshQuality.Highest))
|
||||
{
|
||||
addedModel = new SkeletalModel(sk, mesh, t);
|
||||
Options.Models[guid] = addedModel;
|
||||
|
|
@ -363,7 +363,7 @@ public class Renderer : IDisposable
|
|||
private void LoadSkeletalMesh(USkeletalMesh original)
|
||||
{
|
||||
var guid = new FGuid((uint) original.GetFullName().GetHashCode());
|
||||
if (Options.Models.ContainsKey(guid) || !original.TryConvert(out var mesh)) return;
|
||||
if (Options.Models.ContainsKey(guid) || !original.TryConvert(out var mesh, EMeshQuality.Highest)) return;
|
||||
|
||||
var skeletalModel = new SkeletalModel(original, mesh);
|
||||
Options.Models[guid] = skeletalModel;
|
||||
|
|
@ -394,7 +394,7 @@ public class Renderer : IDisposable
|
|||
return;
|
||||
}
|
||||
|
||||
if (!editorCube.TryConvert(out var mesh))
|
||||
if (!editorCube.TryConvert(out var mesh, EMeshQuality.Highest))
|
||||
return;
|
||||
|
||||
Options.Models[guid] = new StaticModel(original, mesh);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user