mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
FModel v4.4.2
This commit is contained in:
parent
a5cbc5b9f5
commit
ec026400fc
|
|
@ -1 +1 @@
|
|||
Subproject commit 0e178d32bef3b571cabca5f041dae102d209f2d3
|
||||
Subproject commit c527901e384fda7cd75cd630cf2bd535d155574f
|
||||
|
|
@ -5,9 +5,9 @@
|
|||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ApplicationIcon>FModel.ico</ApplicationIcon>
|
||||
<Version>4.4.1.1</Version>
|
||||
<AssemblyVersion>4.4.1.1</AssemblyVersion>
|
||||
<FileVersion>4.4.1.1</FileVersion>
|
||||
<Version>4.4.2.0</Version>
|
||||
<AssemblyVersion>4.4.2.0</AssemblyVersion>
|
||||
<FileVersion>4.4.2.0</FileVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsPublishable>true</IsPublishable>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ public partial class MainWindow
|
|||
#if DEBUG
|
||||
// await _threadWorkerView.Begin(cancellationToken =>
|
||||
// _applicationView.CUE4Parse.Extract(cancellationToken,
|
||||
// "Phoenix/Content/RiggedObjects/Characters/Creatures/Elves/OneOff/HouseElf_F_T3/SK_HouseElf_F_T3_Master.uasset"));
|
||||
// "ShooterGame/Content/Characters/Guide/S0/1P/Models/FP_Guide_S0_Skelmesh.uasset"));
|
||||
// await _threadWorkerView.Begin(cancellationToken =>
|
||||
// _applicationView.CUE4Parse.Extract(cancellationToken,
|
||||
// "Phoenix/Content/Animation/Creatures/Elves/ELF_Rct_Mandrake_Loop_anm.uasset"));
|
||||
// "/Game/Equippables/Guns/SniperRifles/Boltsniper/S0/1P/Anims/FP_Core_Boltsniper_S0_Fire.uasset"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using CUE4Parse_Conversion.Animations;
|
||||
using CUE4Parse_Conversion.Animations.PSA;
|
||||
using CUE4Parse_Conversion.Meshes;
|
||||
using CUE4Parse.UE4.Assets.Exports;
|
||||
using CUE4Parse.UE4.Assets.Exports.Animation;
|
||||
|
|
@ -109,7 +111,7 @@ public class Renderer : IDisposable
|
|||
float maxElapsedTime;
|
||||
switch (anim)
|
||||
{
|
||||
case UAnimSequence animSequence when animSequence.Skeleton.TryLoad(out USkeleton skeleton):
|
||||
case UAnimSequence animSequence when /*!animSequence.IsValidAdditive() && */animSequence.Skeleton.TryLoad(out USkeleton skeleton):
|
||||
{
|
||||
var animSet = skeleton.ConvertAnims(animSequence);
|
||||
var animation = new Animation(animSequence, animSet, guid);
|
||||
|
|
@ -118,6 +120,50 @@ public class Renderer : IDisposable
|
|||
Options.AddAnimation(animation);
|
||||
break;
|
||||
}
|
||||
/*case UAnimSequence additiveAnimSequence when additiveAnimSequence.IsValidAdditive() && additiveAnimSequence.Skeleton.TryLoad(out USkeleton additiveSkeleton):
|
||||
{
|
||||
var reference = additiveAnimSequence.RefPoseSeq?.Load<UAnimSequence>();
|
||||
var referenceSkeleton = reference.Skeleton.Load<USkeleton>();
|
||||
|
||||
var additiveAnimSet = additiveSkeleton.ConvertAnims(additiveAnimSequence);
|
||||
var referenceAnimSet = referenceSkeleton.ConvertAnims(reference);
|
||||
|
||||
var additivePoses = FAnimationRuntime.LoadAsPoses(additiveAnimSet, additiveSkeleton);
|
||||
var referencePoses = FAnimationRuntime.LoadAsPoses(referenceAnimSet, referenceSkeleton, additiveAnimSet.Sequences[0].NumFrames, additiveAnimSequence.RefFrameIndex);
|
||||
|
||||
var animSeq = additiveAnimSet.Sequences[0];
|
||||
animSeq.OriginalSequence = referenceAnimSet.Sequences[0].OriginalSequence;
|
||||
animSeq.Tracks = new List<CAnimTrack>(additivePoses[0].Bones.Length);
|
||||
for (int i = 0; i < additivePoses[0].Bones.Length; i++)
|
||||
{
|
||||
animSeq.Tracks.Add(new CAnimTrack(additivePoses.Length));
|
||||
}
|
||||
|
||||
//loop trough each Pose/Frame and add the output to the empty tracks
|
||||
for (var index = 0; index < additivePoses.Length; index++)
|
||||
{
|
||||
var addPose = additivePoses[index];
|
||||
var refPose = referencePoses[index];
|
||||
switch (additiveAnimSequence.AdditiveAnimType)
|
||||
{
|
||||
case EAdditiveAnimationType.AAT_LocalSpaceBase:
|
||||
FAnimationRuntime.AccumulateLocalSpaceAdditivePoseInternal(refPose, addPose, 1);
|
||||
break;
|
||||
case EAdditiveAnimationType.AAT_RotationOffsetMeshSpace:
|
||||
FAnimationRuntime.AccumulateMeshSpaceRotationAdditiveToLocalPoseInternal(refPose, addPose, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
refPose.Processed = true;
|
||||
refPose.AddToTracks(animSeq.Tracks);
|
||||
}
|
||||
|
||||
var animation = new Animation(additiveAnimSequence, additiveAnimSet, guid);
|
||||
maxElapsedTime = animation.TotalElapsedTime;
|
||||
model.Skeleton.Animate(additiveAnimSet, AnimateWithRotationOnly);
|
||||
Options.AddAnimation(animation);
|
||||
break;
|
||||
}*/
|
||||
case UAnimMontage animMontage when animMontage.Skeleton.TryLoad(out USkeleton skeleton):
|
||||
{
|
||||
var animSet = skeleton.ConvertAnims(animMontage);
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ public class SnimGui
|
|||
|
||||
1. UI / UX
|
||||
- Press Shift while moving a window to dock it
|
||||
- Ctrl Click in a box to input a new value
|
||||
- Double Click in a box to input a new value
|
||||
- Mouse Click + Drag in a box to modify the value without having to type
|
||||
- Press H to hide the window and append the next mesh you extract
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ public class SnimGui
|
|||
- Teleport to quickly move the camera to the position of the model
|
||||
- Delete
|
||||
- Deselect
|
||||
- Copy Name to Clipboard
|
||||
- Copy Path to Clipboard
|
||||
|
||||
4. World
|
||||
- Save All to save all loaded models at once
|
||||
|
|
@ -317,11 +317,19 @@ public class SnimGui
|
|||
5.1. Right Click Section
|
||||
- Show / Hide the section
|
||||
- Swap to change the material used by this section
|
||||
- Copy Name to Clipboard
|
||||
- Copy Path to Clipboard
|
||||
5.2. Transform
|
||||
- Move / Rotate / Scale the model in the world
|
||||
5.3. Morph Targets
|
||||
- Modify the vertices position by a given amount to change the shape of the model
|
||||
|
||||
6. Timeline
|
||||
- Press Space to play/pause
|
||||
- Control the time with your mouse
|
||||
6.1 Right Click Section
|
||||
- Animate another loaded model
|
||||
- Save
|
||||
- Copy Path to Clipboard
|
||||
");
|
||||
ImGui.Separator();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user