From 420d3065f416134404927e544dc8a30f5200aba8 Mon Sep 17 00:00:00 2001 From: Farshid Lashkari Date: Tue, 18 Apr 2017 16:01:58 +0100 Subject: [PATCH] When the "ZUp" option was added to the fbx loader, it broke the previous behavior of converting to the OpenGL axis system. I'm referencing the following commit: https://github.com/openscenegraph/OpenSceneGraph/commit/c168887e5e9da4e891904d11ccac8ddd60b0362d This commit inverted the value of the "fSign" variable, but did not update the previous code that used the variable. I've attached the change that restores the original behavior when not using the "ZUp" --- src/osgPlugins/fbx/ReaderWriterFBX.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osgPlugins/fbx/ReaderWriterFBX.cpp b/src/osgPlugins/fbx/ReaderWriterFBX.cpp index ee3179faa..b62ad6e5a 100644 --- a/src/osgPlugins/fbx/ReaderWriterFBX.cpp +++ b/src/osgPlugins/fbx/ReaderWriterFBX.cpp @@ -409,13 +409,13 @@ ReaderWriterFBX::readNode(const std::string& filenameInit, switch (eUp) { case FbxAxisSystem::eXAxis: - mat.set(0,fSign,0,0,-fSign,0,0,0,0,0,HorizSign,0,0,0,0,1); + mat.set(0,-fSign,0,0,fSign,0,0,0,0,0,HorizSign,0,0,0,0,1); break; case FbxAxisSystem::eYAxis: - mat.set(1,0,0,0,0,fSign,0,0,0,0,fSign*HorizSign,0,0,0,0,1); + mat.set(1,0,0,0,0,-fSign,0,0,0,0,-fSign*HorizSign,0,0,0,0,1); break; case FbxAxisSystem::eZAxis: - mat.set(1,0,0,0,0,0,-fSign*HorizSign,0,0,fSign,0,0,0,0,0,1); + mat.set(1,0,0,0,0,0,fSign*HorizSign,0,0,-fSign,0,0,0,0,0,1); break; } refCoordSysChange = true;