From 4290c05ba44341ea09d6476f937031e71d5e2468 Mon Sep 17 00:00:00 2001 From: "harry.cpp" Date: Sat, 21 Dec 2024 19:03:52 +0100 Subject: [PATCH] Fix some incorrect types --- .../OpenAssetImporter.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs b/MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs index 71efeb84fff..6019c4a82d5 100644 --- a/MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs +++ b/MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs @@ -453,17 +453,17 @@ private void ImportMaterials() if (aiMaterial.HasBumpScaling) material.OpaqueData.Add("BumpScaling", aiMaterial.BumpScaling); if (aiMaterial.HasColorAmbient) - material.OpaqueData.Add("AmbientColor", (Color)aiMaterial.ColorAmbient); + material.OpaqueData.Add("AmbientColor", (Vector4)aiMaterial.ColorAmbient); if (aiMaterial.HasColorDiffuse) - material.OpaqueData.Add("DiffuseColor", (Color)aiMaterial.ColorDiffuse); + material.OpaqueData.Add("DiffuseColor", (Vector4)aiMaterial.ColorDiffuse); if (aiMaterial.HasColorEmissive) - material.OpaqueData.Add("EmissiveColor", (Color)aiMaterial.ColorEmissive); + material.OpaqueData.Add("EmissiveColor", (Vector4)aiMaterial.ColorEmissive); if (aiMaterial.HasColorReflective) - material.OpaqueData.Add("ReflectiveColor", (Color)aiMaterial.ColorReflective); + material.OpaqueData.Add("ReflectiveColor", (Vector4)aiMaterial.ColorReflective); if (aiMaterial.HasColorSpecular) - material.OpaqueData.Add("SpecularColor", (Color)aiMaterial.ColorSpecular); + material.OpaqueData.Add("SpecularColor", (Vector4)aiMaterial.ColorSpecular); if (aiMaterial.HasColorTransparent) - material.OpaqueData.Add("TransparentColor", (Color)aiMaterial.ColorTransparent); + material.OpaqueData.Add("TransparentColor", (Vector4)aiMaterial.ColorTransparent); if (aiMaterial.HasOpacity) material.OpaqueData.Add("Opacity", aiMaterial.Opacity); if (aiMaterial.HasReflectivity) @@ -680,7 +680,7 @@ private GeometryContent CreateGeometry(MeshContent mesh, Mesh aiMesh) geom.Vertices.Channels.Add(VertexChannelNames.TextureCoordinate(i), aiMesh.TextureCoordinateChannels[i].Select(s => new Vector2(s.X, s.Y))); for (var i = 0; i < aiMesh.VertexColorChannelCount; i++) - geom.Vertices.Channels.Add(VertexChannelNames.Color(i), aiMesh.VertexColorChannels[i].Select(s => (Vector4)s)); + geom.Vertices.Channels.Add(VertexChannelNames.Color(i), aiMesh.VertexColorChannels[i].Select(s => (Color)s)); return geom; }