From 4919d3da2f772bfe6bff487e8345fcb2215ddbdb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 30 Mar 2018 16:58:11 +0200 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/1836: make documentation much more clear how to apply global scaling. --- code/CMakeLists.txt | 4 ++-- code/FBXConverter.h | 2 ++ code/ScaleProcess.cpp | 7 ------- include/assimp/postprocess.h | 6 ++++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index dafe017ef..7ae1a7e63 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -177,8 +177,6 @@ SET( Common_SRCS SkeletonMeshBuilder.cpp SplitByBoneCountProcess.cpp SplitByBoneCountProcess.h - ScaleProcess.cpp - ScaleProcess.h StandardShapes.cpp TargetAnimation.cpp TargetAnimation.h @@ -586,6 +584,8 @@ SET( PostProcessing_SRCS PolyTools.h MakeVerboseFormat.cpp MakeVerboseFormat.h + ScaleProcess.cpp + ScaleProcess.h ) SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS}) diff --git a/code/FBXConverter.h b/code/FBXConverter.h index 06a6f07a7..26ba3cb4e 100644 --- a/code/FBXConverter.h +++ b/code/FBXConverter.h @@ -443,6 +443,8 @@ private: aiScene* const out; const FBX::Document& doc; + + std::vector mLightNames; }; } diff --git a/code/ScaleProcess.cpp b/code/ScaleProcess.cpp index 0f60fbdb4..facc39d7d 100644 --- a/code/ScaleProcess.cpp +++ b/code/ScaleProcess.cpp @@ -88,13 +88,6 @@ void ScaleProcess::Execute( aiScene* pScene ) { void ScaleProcess::traverseNodes( aiNode *node ) { applyScaling( node ); - - /*for ( unsigned int i = 0; i < node->mNumChildren; ++i ) { - aiNode *currentNode = currentNode->mChildren[ i ]; - if ( nullptr != currentNode ) { - traverseNodes( currentNode ); - } - }*/ } void ScaleProcess::applyScaling( aiNode *currentNode ) { diff --git a/include/assimp/postprocess.h b/include/assimp/postprocess.h index ebb6728f3..f6c0833ee 100644 --- a/include/assimp/postprocess.h +++ b/include/assimp/postprocess.h @@ -537,9 +537,11 @@ enum aiPostProcessSteps /**
This step will perform a global scale of the model. * * Some importers are providing a mechanism to define a scaling unit for the - * model. This post processing step can be used to do so. + * model. This post processing step can be used to do so. You need to get the + * global scaling from your importer settings like in FBX. Use the flag + * AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table to configure this. * - * Use #AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to control this. + * Use #AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaing factor. */ aiProcess_GlobalScale = 0x8000000,