From e6bbb512d7b91b11ef26a2e5b75109190b7fafb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Terziman?= Date: Thu, 5 Dec 2013 18:14:19 +0100 Subject: [PATCH] In AssimpViewer: postprocess steps added to export to correct bugs in export (especially conversion from left to right handed) --- tools/assimp_view/MessageProc.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/assimp_view/MessageProc.cpp b/tools/assimp_view/MessageProc.cpp index 26753f846..edd8c623a 100644 --- a/tools/assimp_view/MessageProc.cpp +++ b/tools/assimp_view/MessageProc.cpp @@ -1084,7 +1084,15 @@ void DoExport(size_t formatId) } // export the file - const aiReturn res = exp.Export(g_pcAsset->pcScene,e->id,sFinal.c_str()); + const aiReturn res = exp.Export(g_pcAsset->pcScene,e->id,sFinal.c_str(), + ppsteps | /* configurable pp steps */ + aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing + aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes + aiProcess_Triangulate | // triangulate polygons with more than 3 edges + aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space + aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives + 0 + ); if (res == aiReturn_SUCCESS) { CLogDisplay::Instance().AddEntry("[INFO] Exported file " + sFinal,D3DCOLOR_ARGB(0xFF,0x00,0xFF,0x00)); return;