diff --git a/src/mod_converter/fbx.cpp b/src/mod_converter/fbx.cpp index 6f4d421..00cd31a 100644 --- a/src/mod_converter/fbx.cpp +++ b/src/mod_converter/fbx.cpp @@ -219,6 +219,7 @@ void model::printFbx(const std::string &fn) const // Prepare the FBX SDK. InitializeSdkObjects(lSdkManager, lScene); + // default is ??? //FbxAxisSystem::MayaZUp.ConvertScene(lScene); // Create the scene. diff --git a/src/mod_converter/mod_converter.cpp b/src/mod_converter/mod_converter.cpp index a0fe304..4771b5e 100644 --- a/src/mod_converter/mod_converter.cpp +++ b/src/mod_converter/mod_converter.cpp @@ -40,7 +40,7 @@ bool silent = false; bool printMaxPolygonBlock = false; cl::opt p(cl::Positional, cl::desc(""), cl::value_desc("file or directory"), cl::Required); -cl::opt all_formats("a", cl::desc("All formats")); +cl::opt all_formats("af", cl::desc("All formats")); yaml root; cl::opt stats("i", cl::desc("Gather information from (models)")); diff --git a/src/model/model.cpp b/src/model/model.cpp index 06db190..d4265d8 100644 --- a/src/model/model.cpp +++ b/src/model/model.cpp @@ -84,21 +84,32 @@ std::string translate(const std::string &s) return s3; } -enum class AxisSystem +enum AxisSystem { MayaYUpZFrontRH, + Windows3dViewer = MayaYUpZFrontRH, + AIM, - UE4 = AIM, + UE4 = AIM, // Do not use 'Convert scene' during UE4 import! + + ax_aim = AIM, + ax_ue4, + ax_maya_y = MayaYUpZFrontRH, + ax_win_3d_viewer, }; -AxisSystem AS = AxisSystem::AIM; +cl::opt AS(cl::desc("Choose axis system:"), + cl::values( + clEnumVal(ax_ue4, "Original AIM or UE4 axis system"), + clEnumVal(ax_maya_y, "Default MAYA Y-Up Z-Front or Windows 3d Viewer axis system") + ) + , cl::init(AxisSystem::UE4) +); int get_x_coordinate_id() { switch (AS) { - case AxisSystem::MayaYUpZFrontRH: - return 0; case AxisSystem::AIM: return 1; default: @@ -131,13 +142,13 @@ void aim_vector3::load(const buffer &b) switch (AS) { case AxisSystem::MayaYUpZFrontRH: - // MAYA Y UP, Z FRONT (RH) + // Y UP, Z FRONT (RH) READ(b, base::x); READ(b, base::z); READ(b, base::y); break; case AxisSystem::AIM: - // AIM viewer, UE4, Z UP (LH) + // Z UP, X FRONT (LH) READ(b, base::y); READ(b, base::x); READ(b, base::z);