Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions SuperBMDLib/source/Arguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ public Arguments(string[] args)

for (int i = 0; i < args.Length; i++)
{
if (args[0].EndsWith(".bmd") || args[0].EndsWith(".bdl"))
input_path = args[0];
else
if (i + 1 >= args.Length)
throw new Exception("The parameters were malformed.");

switch (args[i])
{
case "-i":
Expand Down Expand Up @@ -82,8 +88,6 @@ public Arguments(string[] args)
case "--bdl":
output_bdl = true;
break;
default:
throw new Exception($"Unknown parameter \"{ args[i] }\"");
}
}

Expand Down
4 changes: 2 additions & 2 deletions SuperBMDLib/source/BMD/MAT3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -776,9 +776,9 @@ public void FillScene(Assimp.Scene scene, TEX1 textures, string fileDir)
{
int texIndex = mat.TextureIndices[0];
//texIndex = m_TexRemapBlock[texIndex];
string texPath = Path.Combine(fileDir, textures[texIndex].Name + ".png");
string texFilename = textures[texIndex].Name + ".png";

Assimp.TextureSlot tex = new Assimp.TextureSlot(texPath, Assimp.TextureType.Diffuse, 0,
Assimp.TextureSlot tex = new Assimp.TextureSlot(texFilename, Assimp.TextureType.Diffuse, 0,
Assimp.TextureMapping.FromUV, 0, 1.0f, Assimp.TextureOperation.Add,
textures[texIndex].WrapS.ToAssImpWrapMode(), textures[texIndex].WrapT.ToAssImpWrapMode(), 0);

Expand Down