diff --git a/port/Assimp.NET/Assimp.NET_DEMO/AssimpView.cs b/port/Assimp.NET/Assimp.NET_DEMO/AssimpView.cs index 52eb22285..bff7e9574 100644 --- a/port/Assimp.NET/Assimp.NET_DEMO/AssimpView.cs +++ b/port/Assimp.NET/Assimp.NET_DEMO/AssimpView.cs @@ -183,16 +183,29 @@ namespace Assimp.Viewer aiPostProcessSteps.aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives (aiPostProcessSteps)0); + // default model + var path = "../../../../../../test/models/3DS/test1.3ds"; + importer = new Importer(); - var path = "../../../../../../test/models/3DS/jeep1.3ds"; + string[] args = Environment.GetCommandLineArgs(); + if (args.Length > 1) { + path = args[1]; + } + + //var path = "man.3ds"; scene = importer.ReadFile(path, flags); - if (scene != null) { + if (scene != null) + { directory = Path.GetDirectoryName(path); CacheMaterials(scene.mMaterials); CacheMeshes(scene.mMeshes); SetupCamera(scene.mCameras); } + else { + MessageBox.Show("Failed to open file: " + path + ". Either Assimp screwed up or the path is not valid."); + Application.Exit(); + } } private void CacheMeshes(aiMeshVector meshes) { diff --git a/port/Assimp.NET/CSharpViewerScreenShot.PNG b/port/Assimp.NET/CSharpViewerScreenShot.PNG new file mode 100644 index 000000000..a6a2b8f53 Binary files /dev/null and b/port/Assimp.NET/CSharpViewerScreenShot.PNG differ diff --git a/port/Assimp.NET/README.txt b/port/Assimp.NET/README.txt index 288215609..19bae442e 100644 --- a/port/Assimp.NET/README.txt +++ b/port/Assimp.NET/README.txt @@ -8,6 +8,10 @@ NOTE: This has only been tested on 32-bit Windows 7 in .NET 3.5SP1 compiled under Visual Studio 2008 with the 'Debug' and 'Release' targets. +The Viewer is very minimalistic, don't expect all files to be displayed +properly. Feel free to extend it ;-) + + How To Build ------------