Skip to content

Commit

Permalink
Add option to omit vertex colors on model import #73
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsPepperpot committed Oct 16, 2024
1 parent 56ea327 commit 7d19eaf
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 63 deletions.
52 changes: 43 additions & 9 deletions IndustrialPark/ArchiveEditor/Dialogs/ImportModel.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions IndustrialPark/ArchiveEditor/Dialogs/ImportModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,23 @@ public static (List<Section_AHDR> AHDRs, bool overwrite, bool simps, bool ledgeG
ReadFileMethods.ExportRenderWareFile(
CreateDFFFromAssimp(filePath,
a.checkBoxFlipUVs.Checked,
a.checkBoxIgnoreMeshColors.Checked),
a.checkBoxUseMeshColors.Checked,
a.radioButtonWhiteVCol.Checked
),
modelRenderWareVersion(game));
}
catch (ArgumentException)
catch (ArgumentException e)
{
MessageBox.Show("Model could not be imported.\nPlease check that the vertex/triangle counts do not exceed "
+ TRI_AND_VERTEX_LIMIT + ".",
+ TRI_AND_VERTEX_LIMIT + ".\n " + e.Message,
"Error Importing Model",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return (null, false, false, false, false, false, false, false);
}
catch (Exception)
catch (Exception e)
{
MessageBox.Show("Model could not be imported.",
MessageBox.Show($"Model could not be imported.\n{e.Message}",
"Error Importing Model",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
Expand All @@ -127,7 +129,7 @@ public static (List<Section_AHDR> AHDRs, bool overwrite, bool simps, bool ledgeG
ReadFileMethods.ExportRenderWareFile(
CreateBSPFromAssimp(filePath,
a.checkBoxFlipUVs.Checked,
a.checkBoxIgnoreMeshColors.Checked),
a.checkBoxUseMeshColors.Checked),
modelRenderWareVersion(game));
}
catch (ArgumentException)
Expand Down
Loading

0 comments on commit 7d19eaf

Please sign in to comment.