mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
fixes
This commit is contained in:
parent
cf512a3d3d
commit
1f8f080c20
|
|
@ -1 +1 @@
|
|||
Subproject commit 86d95053f04184fe7fb36ab57bf0c967221ef7d3
|
||||
Subproject commit e6ac7e9802301341895c4784311484e9e5b045d5
|
||||
|
|
@ -74,7 +74,7 @@ public partial class DictionaryEditor
|
|||
DialogResult = true;
|
||||
Close();
|
||||
break;
|
||||
case "MapStructTypes":
|
||||
case "Versioning Configuration (MapStructTypes)":
|
||||
MapStructTypes = JsonConvert.DeserializeObject<Dictionary<string, KeyValuePair<string, string>>>(MyAvalonEditor.Document.Text);
|
||||
// DialogResult = !Options.SequenceEqual(_defaultOptions);
|
||||
DialogResult = true;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user