Skip to content

Commit cc2ff71

Browse files
committed
Fixing 16bit bone weights and FMaterialInput converter
1 parent 037058d commit cc2ff71

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CUE4Parse

FModel/ViewModels/CUE4ParseViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ public void Extract(CancellationToken cancellationToken, GameFile entry, bool ad
606606
case "csv":
607607
case "pem":
608608
case "tps":
609+
case "tgs": // State of Decay 2
609610
case "lua":
610611
case "js":
611612
case "po":
@@ -656,7 +657,7 @@ public void Extract(CancellationToken cancellationToken, GameFile entry, bool ad
656657
{
657658
var archive = entry.CreateReader();
658659
var wwise = new WwiseReader(archive);
659-
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(wwise, Formatting.Indented), saveProperties, updateUi);
660+
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(wwise, Formatting.Indented), saveProperties, updateUi);
660661
foreach (var (name, data) in wwise.WwiseEncodedMedias)
661662
{
662663
SaveAndPlaySound(entry.Path.SubstringBeforeWithLast('/') + name, "WEM", data);

FModel/Views/Snooper/Models/UModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
@@ -163,8 +163,8 @@ protected UModel(UObject export, CBaseMeshLod lod, IReadOnlyList<ResolvedObject>
163163
int max = skelVert.Influences.Count;
164164
for (int j = 0; j < 8; j++)
165165
{
166-
var boneID = j < max ? skelVert.Influences[j].Bone : (short) 0;
167-
var weight = j < max ? skelVert.Influences[j].RawWeight : (byte) 0;
166+
var boneID = j < max ? skelVert.Influences[j].Bone : (ushort) 0;
167+
var weight = j < max ? skelVert.Influences[j].RawWeight : (ushort) 0;
168168

169169
// Pack bone ID and weight
170170
Vertices[baseIndex + count++] = (boneID << 16) | weight;

0 commit comments

Comments
 (0)