diff --git a/CUE4Parse b/CUE4Parse index 86d95053..e6ac7e98 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 86d95053f04184fe7fb36ab57bf0c967221ef7d3 +Subproject commit e6ac7e9802301341895c4784311484e9e5b045d5 diff --git a/FModel/Views/Resources/Controls/DictionaryEditor.xaml.cs b/FModel/Views/Resources/Controls/DictionaryEditor.xaml.cs index 3d247580..2973c2f4 100644 --- a/FModel/Views/Resources/Controls/DictionaryEditor.xaml.cs +++ b/FModel/Views/Resources/Controls/DictionaryEditor.xaml.cs @@ -74,7 +74,7 @@ public partial class DictionaryEditor DialogResult = true; Close(); break; - case "MapStructTypes": + case "Versioning Configuration (MapStructTypes)": MapStructTypes = JsonConvert.DeserializeObject>>(MyAvalonEditor.Document.Text); // DialogResult = !Options.SequenceEqual(_defaultOptions); DialogResult = true; diff --git a/FModel/Views/Snooper/Models/StaticModel.cs b/FModel/Views/Snooper/Models/StaticModel.cs index fd253041..be0dc9b1 100644 --- a/FModel/Views/Snooper/Models/StaticModel.cs +++ b/FModel/Views/Snooper/Models/StaticModel.cs @@ -46,7 +46,7 @@ public class StaticModel : UModel AddInstance(Transform.Identity); - Box = staticMesh.BoundingBox * Constants.SCALE_DOWN_RATIO; + Box = staticMesh.BoundingBox * 1.5f * Constants.SCALE_DOWN_RATIO; } public StaticModel(UStaticMesh export, CStaticMesh staticMesh, Transform transform = null) diff --git a/FModel/Views/Snooper/Renderer.cs b/FModel/Views/Snooper/Renderer.cs index d5af993f..18a64aa3 100644 --- a/FModel/Views/Snooper/Renderer.cs +++ b/FModel/Views/Snooper/Renderer.cs @@ -454,6 +454,7 @@ public class Renderer : IDisposable Scale = staticMeshComp.GetOrDefault("RelativeScale3D", FVector.OneVector) }; + OverrideVertexColors(staticMeshComp, m); if (Options.TryGetModel(guid, out var model)) { model.AddInstance(t); @@ -527,6 +528,20 @@ public class Renderer : IDisposable } } + private void OverrideVertexColors(UStaticMeshComponent staticMeshComp, UStaticMesh staticMesh) + { + if (staticMeshComp.LODData is not { Length: > 0 } || staticMesh.RenderData is not { LODs.Length: > 0 }) + return; + + for (var lod = 0; lod < staticMeshComp.LODData.Length; lod++) + { + var vertexColors = staticMeshComp.LODData[lod].OverrideVertexColors; + if (vertexColors == null) continue; + + staticMesh.RenderData.LODs[lod].ColorVertexBuffer = vertexColors; + } + } + private void WorldTextureData(Material material, UObject textureData, string name, string key) { if (textureData.TryGetValue(out FPackageIndex package, name) && package.Load() is UTexture2D texture)