e
This commit is contained in:
@@ -301,9 +301,9 @@ Namespace ObjModule
|
|||||||
Case line.ToLower.StartsWith("kd ")
|
Case line.ToLower.StartsWith("kd ")
|
||||||
Dim splitColor() As String = line.Substring(3).Split(" "c)
|
Dim splitColor() As String = line.Substring(3).Split(" "c)
|
||||||
Dim col As Color = Color.FromArgb(
|
Dim col As Color = Color.FromArgb(
|
||||||
Convert.ToSingle(Math.Round(CInt(splitColor(0)))),
|
Convert.ToSingle(Math.Round(255 * splitColor(0))),
|
||||||
Convert.ToSingle(Math.Round(CInt(splitColor(1)))),
|
Convert.ToSingle(Math.Round(255 * splitColor(1))),
|
||||||
Convert.ToSingle(Math.Round(CInt(splitColor(2)))))
|
Convert.ToSingle(Math.Round(255 * splitColor(2))))
|
||||||
curMat.Color = col
|
curMat.Color = col
|
||||||
|
|
||||||
Case line.ToLower.StartsWith("d ")
|
Case line.ToLower.StartsWith("d ")
|
||||||
@@ -365,7 +365,7 @@ Namespace ObjModule
|
|||||||
sw.WriteLine($"newmtl {name}")
|
sw.WriteLine($"newmtl {name}")
|
||||||
|
|
||||||
If mat.Color IsNot Nothing Then
|
If mat.Color IsNot Nothing Then
|
||||||
sw.WriteLine($"kd {mat.Color.Value.R.ToString.Replace(",", ".")} {mat.Color.Value.G.ToString.Replace(",", ".")} {mat.Color.Value.B.ToString.Replace(",", ".")}")
|
sw.WriteLine($"kd {(mat.Color.Value.R / 255).ToString.Replace(",", ".")} {(mat.Color.Value.G / 255).ToString.Replace(",", ".")} {(mat.Color.Value.B / 255).ToString.Replace(",", ".")}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mat.Opacity IsNot Nothing Then
|
If mat.Opacity IsNot Nothing Then
|
||||||
|
|||||||
Reference in New Issue
Block a user